Skip to content

Reduce the snowflake async buffer size - #30671

Merged
Octavia The Approver (octavia-approvington) merged 3 commits into
masterfrom
bmoric/reduce-snowflake-buffer-size
Sep 21, 2023
Merged

Octavia The Approver (octavia-approvington) merged 3 commits into
masterfrom
bmoric/reduce-snowflake-buffer-size

Conversation

@benmoriceau

Copy link
Copy Markdown
Contributor

What

Reduce the async buffer size ratio for the snowflake destination from 0.7 to 0.5

@vercel

vercel Bot commented Sep 21, 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 21, 2023 8:25pm

@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.

final ParsedCatalog parsedCatalog,
final String defaultNamespace,
final boolean useDestinationsV2Columns,
Optional<Long> BufferMemoryLimit) {

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.

needs final. Also casing

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.

done

flusher,
catalog,
new BufferManager(),
BufferMemoryLimit.map(memoryLimit -> new BufferManager(memoryLimit)).orElse(new BufferManager()),

@tryangul Ryan Br... (tryangul) Sep 21, 2023 •

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.

can we put this in a variable or method for clarity

Something like getBufferMemoryLimit() { return bufferMemoryLimit.getOrElse(DEFAULT_VALUE)

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.

Done

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.

Just trying to understand the tradeoffs here : does this mean that the destination will be slower assuming the source is already producing records faster than the destination can consume?

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

destination-snowflake test report (commit b4aeb3f022) - ❌

⏲️ Total pipeline duration: 77mn34s

Step Result
Build connector tar ✅
Build destination-snowflake docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ❌
Validate airbyte-integrations/connectors/destination-snowflake/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=destination-snowflake test

@benmoriceau

Copy link
Copy Markdown
Contributor Author

Just trying to understand the tradeoffs here : does this mean that the destination will be slower assuming the source is already producing records faster than the destination can consume?

Not exactly, we will still buffer the main difference is that we will reach the limit of the buffer faster (because it is too small). In most of those case, we would have reach the buffer limit even if we had a bigger buffer, reducing the size will just makes use reaching the limit faster.

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

destination-snowflake test report (commit 5ec7b96795) - ❌

⏲️ Total pipeline duration: 78mn16s

Step Result
Build connector tar ✅
Build destination-snowflake docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ❌
Validate airbyte-integrations/connectors/destination-snowflake/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=destination-snowflake test

@akashkulk

Copy link
Copy Markdown
Contributor

Just trying to understand the tradeoffs here : does this mean that the destination will be slower assuming the source is already producing records faster than the destination can consume?

Not exactly, we will still buffer the main difference is that we will reach the limit of the buffer faster (because it is too small). In most of those case, we would have reach the buffer limit even if we had a bigger buffer, reducing the size will just makes use reaching the limit faster.

And just so that I understand - this will just result in more frequent uploads to the destination (Snowflake)?

Approving from my end - but will defer to Ryan Br... (@tryangul) for a more thorough review

@airbyte-oss-build-runner

Copy link
Copy Markdown
Collaborator

destination-snowflake test report (commit f22c6c0fa9) - ✅

⏲️ Total pipeline duration: 13mn50s

Step Result
Build connector tar ✅
Build destination-snowflake docker image for platform linux/x86_64 ✅
Java Connector Unit Tests ✅
Java Connector Integration Tests ✅
Validate airbyte-integrations/connectors/destination-snowflake/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=destination-snowflake test

@tryangul

Ryan Br... (tryangul) commented Sep 21, 2023 •

Copy link
Copy Markdown
Contributor

And just so that I understand - this will just result in more frequent uploads to the destination (Snowflake)?

It just means we will buffer less before backpressuring. The goal is to buffer enough so our upload threads always have work available as soon as they finish, but not so much we oom. The original limits as they've been set were just a best guess when this was originally designed months ago.

@benmoriceau

Copy link
Copy Markdown
Contributor Author

/approve-and-merge reason="Build is passing"

@octavia-approvington

Copy link
Copy Markdown
Contributor

Myomoto says it looks good
thats a niiice

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/destination/snowflake

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants