Skip to content

source-mssql: enable state compression - #33225

Merged
Marius Posta (postamar) merged 8 commits into
masterfrom
postamar/source-mssql-enable-state-compression
Dec 12, 2023
Merged

Marius Posta (postamar) merged 8 commits into
masterfrom
postamar/source-mssql-enable-state-compression

Conversation

@postamar

@postamar Marius Posta (postamar) commented Dec 7, 2023 •

Copy link
Copy Markdown
Contributor

Most of the work here involved testing that this works, which was a bit more involved than for MySQL.

@postamar
Marius Posta (postamar) requested a review from a team as a code owner December 7, 2023 16:48
@vercel

vercel Bot commented Dec 7, 2023 •

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 6:38pm

@github-actions

github-actions Bot commented Dec 7, 2023 •

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.

@octavia-squidington-iii Octavia Squidington III (octavia-squidington-iii) removed the CDK Connector Development Kit label Dec 7, 2023
}

@Override
public boolean compressSchemaHistoryForState() {

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.

Should we just flip this to true and refactor rest of code? Schema history compression currently applies to MySQL & MsSQL, so could be a way to simplify code + make sure we apply it to default to any future connector that has a notion of schema history

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.

I agree in principle but I'd like to do that change in a separate PR, if that's OK.

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.

That's fine, followup works

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.

Looks good, one small comment

// Increase schema history size to trigger state compression.
// We do this by adding lots of columns with long names,
// then migrating to a new CDC capture instance for each table.
// This is admittedly somewhat awkward and perhaps could be improved.

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.

Not blocking, since it seems to be a heavy lift, but in the future we could configure this as a general "test" config to make it smaller than 3MB : https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/java/airbyte-cdk/db-sources/src/main/java/io/airbyte/cdk/integrations/debezium/internals/AirbyteSchemaHistoryStorage.java#L41

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.

I'm holding out until I better understand how Debezium + SQL Server do CDC. Perhaps I'm overlooking something obvious. Otherwise yes absolutely let's trigger the compression sooner.

@postamar
Marius Posta (postamar) merged commit 3026cc5 into master Dec 12, 2023
@postamar
Marius Posta (postamar) deleted the postamar/source-mssql-enable-state-compression branch December 12, 2023 19:08
Thomas Mathew (tmathew0309) pushed a commit to tmathew0309/airbyte that referenced this pull request Jan 12, 2024
Co-authored-by: postamar <postamar@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview — 4085dd51 Deployed Dec 12, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/mssql connectors/source/mysql

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants