-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
🎉 Destination snowflake: reduce memory consumption #10297
Conversation
94d47b9
to
069f610
Compare
@@ -137,7 +128,8 @@ public final void insertRecords(final JdbcDatabase database, | |||
throws Exception { | |||
AirbyteSentry.executeWithTracing("InsertRecords", | |||
() -> { | |||
records.forEach(airbyteRecordMessage -> getDataAdapter().adapt(airbyteRecordMessage.getData())); |
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.
This is bad. For every record message, a new data adapter object is created (in the getDataAdapter
method).
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.
obviously this is already way better, but could we just dump the data adapter into a field rather than constructing one per record batch?
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.
Ah, good point! Done.
/test connector=connectors/destination-snowflake
|
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.
lgtm!
0121a61
to
7aaddd2
Compare
/test connector=connectors/destination-snowflake
|
/publish connector=connectors/destination-snowflake run-tests=false
|
What
🚨 User Impact 🚨
None expected.
Pre-merge Checklist
Updating 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 here