-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL Source Support CDC heartbeats #23376
Conversation
# Conflicts: # airbyte-integrations/connectors/source-mssql/build.gradle # airbyte-integrations/connectors/source-postgres/build.gradle
# Conflicts: # airbyte-integrations/connectors/source-postgres/src/main/resources/spec.json # airbyte-integrations/connectors/source-postgres/src/test-integration/resources/expected_spec.json # airbyte-integrations/connectors/source-postgres/src/test-integration/resources/expected_strict_encrypt_spec.json
# Conflicts: # airbyte-integrations/bases/debezium/src/main/java/io/airbyte/integrations/debezium/internals/PostgresReplicationConnection.java # airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/CdcPostgresSourceTest.java
Affected Connector ReportNOTE
|
Connector | Version | Changelog | Publish |
---|---|---|---|
source-alloydb |
1.0.47 |
✅ | ✅ |
source-alloydb-strict-encrypt |
1.0.47 |
🔵 (ignored) |
🔵 (ignored) |
source-mssql |
0.4.28 |
✅ | ✅ |
source-mssql-strict-encrypt |
0.4.28 |
🔵 (ignored) |
🔵 (ignored) |
source-mysql |
1.0.21 |
✅ | ✅ |
source-mysql-strict-encrypt |
1.0.21 |
🔵 (ignored) |
🔵 (ignored) |
source-postgres |
1.0.48 |
✅ | ✅ |
source-postgres-strict-encrypt |
1.0.48 |
🔵 (ignored) |
🔵 (ignored) |
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Destinations (0)
Connector | Version | Changelog | Publish |
---|
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Other Modules (0)
Actionable Items
(click to expand)
Category | Status | Actionable Item |
---|---|---|
Version | ❌ mismatch |
The version of the connector is different from its normal variant. Please bump the version of the connector. |
⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
|
Changelog | ⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
❌ changelog missing |
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog. | |
Publish | ⚠ not in seed |
The connector is not in the seed file (e.g. source_definitions.yaml ), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug. |
❌ diff seed version |
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version. |
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VitaliiMaltsev please wait for my review as well. I want to carry out some tests on this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there is a bug in the PR. A MySQL heartbeat event contains binlog filename and position in the file. We need to compare both in order to determine have we reached the target or not. But you are not extracting the filename and only extracting the position and using it for comparison.
Here is a sample heartbeat event
SourceRecord{sourcePartition={server=models_schema}, sourceOffset={transaction_id=null, ts_sec=1678344508, file=binlog.000002, pos=11149}} ConnectRecord{topic='__debezium-heartbeat.models_schema', kafkaPartition=0, key=Struct{serverName=models_schema}, keySchema=Schema{io.debezium.connector.common.ServerNameKey:STRUCT}, value=Struct{ts_ms=1678344508923}, valueSchema=Schema{io.debezium.connector.common.Heartbeat:STRUCT}, timestamp=null, headers=ConnectHeaders(headers=)}
As you can see the SourceRecord
contains file=binlog.000002, pos=11149
. Both should be used for comparison.
Refer the method reachedTargetPosition
in MySqlCdcTargetPosition
on how we compare the filename and pos both to determine if we have reached target position or not. Similar thing would needed to be done
@subodh1810 closing this PR in favor of #23984 due to numerous merge conflicts |
See #23984 |
What
Issue https://app.zenhub.com/workspaces/db--dw-source-connectors-6333360e0a41155061efbcbd/issues/gh/airbytehq/airbyte/23257
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes