Skip to content

Update MySQL streaming config - #30744

Merged
Akash Kulkarni (akashkulk) merged 6 commits into
masterfrom
debug_mysql_indexOOB
Sep 26, 2023
Merged

Akash Kulkarni (akashkulk) merged 6 commits into
masterfrom
debug_mysql_indexOOB

Conversation

@akashkulk

@akashkulk Akash Kulkarni (akashkulk) commented Sep 25, 2023 •

Copy link
Copy Markdown
Contributor

Fixes issue described https://airbytehq-team.slack.com/archives/C043JHEEYKG/p1695336111738279

Some notes :

  1. The auto-commit behavior was added to primarily handle the Postgres use case of respecting fetch size : https://jdbc.postgresql.org/documentation/query/
  2. MySql extends the default behavior due to lack of support for fetch size. This is hanled in MySqlStreamingQueryConfig.java
  3. Step 2 was necessary due to poor interactions of using cursor fetch on MySQL DB. Fetch size is set to Integer.MIN_VALUE to disable client side caching and the the result set arrives as soon as the responses are ready. See 🎉 8890 Source MySql: Fix large table issue by fetch size #17236 for more context.
  4. Seperately, there seems to be an issue in the JDBC driver handling of resetting auto-commit values for MariaDB. Unsure what the root cause is there, but the code no longer crashes when auto-commit values don't need to be changed.
  5. The auto-commit setting is not needed for MySQL, but was copied over from the subclass that primarily handles the Postgres connection configs. Hence, this should be safe to remove.

@vercel

vercel Bot commented Sep 25, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Sep 26, 2023 10:09pm

@github-actions

Copy link
Copy Markdown
Contributor

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

source-mysql test report (commit 80d5c2fc00) - ✅

⏲️ Total pipeline duration: 27mn49s

Step Result
Build connector tar ✅
Build source-mysql docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Acceptance tests ✅
Validate airbyte-integrations/connectors/source-mysql/metadata.yaml ✅
Connector version semver check ✅
Connector version increment check ✅
QA checks ✅

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql test

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

source-mysql-strict-encrypt test report (commit 80d5c2fc00) - ✅

⏲️ Total pipeline duration: 07mn43s

Step Result
Build connector tar ✅
Build source-mysql-strict-encrypt docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Acceptance tests ✅
Validate airbyte-integrations/connectors/source-mysql-strict-encrypt/metadata.yaml ✅
Connector version semver check ✅
Connector version increment check ✅
QA checks ✅

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

try {
connection.setAutoCommit(true);
if (!connection.getAutoCommit()) {
connection.setAutoCommit(true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I not familiar with the intricacies here
But Is this logically any different ?
in both before and after we end with autoCommit == true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logically it could be different if we had multiple transactions within a single streaming query which mutate the source DB (which we don't)

The setting autocommit = true was just done to deal with a quirk in the POstgres JDBC driver + fetch size interaction which does not apply for mysql.

@akashkulk

Akash Kulkarni (akashkulk) commented Sep 26, 2023 •

Copy link
Copy Markdown
Contributor Author

/connector-performance connector=connectors/source-mysql

Note: The following dataset= values are supported: 1m(default), 10m, 20m,

bottleneck_stream1, bottleneck_stream_randomseed. For destinations only: you can also use stream-numbers=Nto simulate N number of parallel streams. Additionally,sync-mode=incrementalis supported for destinations. For example:dataset=1m stream-numbers=2 sync-mode=incremental`

🏃 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/6317576894.

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

source-mysql-strict-encrypt test report (commit 22860626de) - ✅

⏲️ Total pipeline duration: 03mn09s

Step Result
Build connector tar ✅
Build source-mysql-strict-encrypt docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Acceptance tests ✅
Validate airbyte-integrations/connectors/source-mysql-strict-encrypt/metadata.yaml ✅
Connector version semver check ✅
Connector version increment check ✅
QA checks ✅

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

@akashkulk

Akash Kulkarni (akashkulk) commented Sep 26, 2023 •

Copy link
Copy Markdown
Contributor Author

/connector-performance connector=connectors/source-mysql dataset=20m

Note: The following dataset= values are supported: 1m(default), 10m, 20m,

bottleneck_stream1, bottleneck_stream_randomseed. For destinations only: you can also use stream-numbers=Nto simulate N number of parallel streams. Additionally,sync-mode=incrementalis supported for destinations. For example:dataset=1m stream-numbers=2 sync-mode=incremental`

🏃 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/6317621188.

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

source-mysql test report (commit 22860626de) - ✅

⏲️ Total pipeline duration: 02mn18s

Step Result
Build connector tar ✅
Build source-mysql docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Acceptance tests ✅
Validate airbyte-integrations/connectors/source-mysql/metadata.yaml ✅
Connector version semver check ✅
Connector version increment check ✅
QA checks ✅

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql test

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

source-mysql-strict-encrypt test report (commit 434e39b0ee) - ✅

⏲️ Total pipeline duration: 03mn22s

Step Result
Build connector tar ✅
Build source-mysql-strict-encrypt docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Acceptance tests ✅
Validate airbyte-integrations/connectors/source-mysql-strict-encrypt/metadata.yaml ✅
Connector version semver check ✅
Connector version increment check ✅
QA checks ✅

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

source-mysql test report (commit 434e39b0ee) - ✅

⏲️ Total pipeline duration: 02mn19s

Step Result
Build connector tar ✅
Build source-mysql docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Acceptance tests ✅
Validate airbyte-integrations/connectors/source-mysql/metadata.yaml ✅
Connector version semver check ✅
Connector version increment check ✅
QA checks ✅

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql test

@akashkulk
Akash Kulkarni (akashkulk) merged commit 2097c0e into master Sep 26, 2023
@akashkulk
Akash Kulkarni (akashkulk) deleted the debug_mysql_indexOOB branch September 26, 2023 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants