Ensure a sequential write to DM by always using a single output#898
Draft
thorkildcognite wants to merge 1 commit intomasterfrom
Draft
Ensure a sequential write to DM by always using a single output#898thorkildcognite wants to merge 1 commit intomasterfrom
thorkildcognite wants to merge 1 commit intomasterfrom
Conversation
We want to go slow to go fast with data modeling, and never write with more than one partition at a time. This ensures this by repartitioning down to 1 partition before emitting the result. Since we almost always had 200 partitions going into the write, we would always clamp this down to the ideal, which was set to 1. But, if we actually had less than 50 partitions going into this, it would not be repartitioned and we would actually try to write to DMS with 50 parallel writes. I first didn't find any way to trigger this, but I think I can trigger it by reading directly from time series, sequences etc., which have 50 or smaller as default partitions. This is very hard to verify in production, but there should be no clear downside to ensuring this.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #898 +/- ##
=======================================
Coverage 80.76% 80.77%
=======================================
Files 43 43
Lines 2839 2840 +1
Branches 115 121 +6
=======================================
+ Hits 2293 2294 +1
Misses 546 546
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to go slow to go fast with data modeling, and never write with more than one partition at a time. This change ensures this by repartitioning down to 1 partition before emitting the result.
Since we almost always have 200 partitions going into the write, we would always clamp this down to the ideal, which was set to 1. But, if we actually had less than 50 partitions going into this, it would not be repartitioned and we would actually try to write to DMS with 50 parallel writes (potentially).
I first didn't find any way to trigger this, but I think I can trigger it by reading directly from time series, sequences etc., which have 50 or smaller as default partitions.
This is very hard to verify in production, but there should be no clear downside to ensuring this.