Repository navigation
S3 Destination Uses Async Framework - #42405
Gireesh Sreepathi (gisripa) merged 16 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join Johnny Schmidt (@johnny-schmidt) and the rest of your teammates on |
Edward Gao (edgao)
left a comment
There was a problem hiding this comment.
several small comments, lgtm once those are resolved. Like I said in one of my comments - either I'm missing something, or returning a new BufferingStrategy on every flush seems like something we'd want to do in all destinations?
27652f2 to
470eee5
Compare
There was a problem hiding this comment.
Very misleading typo here, fixed locally. (states => stats)
f5414ea to
5c9ea03
Compare
Edward Gao (edgao)
left a comment
There was a problem hiding this comment.
one last lgtm for formality's sake
5c9ea03 to
4d4e5db
Compare
4d4e5db to
b7615bb
Compare
b7615bb to
4d4e5db
Compare
88a707c to
5ac38e1
Compare
Gireesh Sreepathi (gisripa)
left a comment
There was a problem hiding this comment.
BaseGcsDestination.kt is failing compilation. Either we can choose to keep it backward-compat or split the changes of cdk and publish and work off of a published version.
5ac38e1 to
5c1dd5e
Compare
d5e9a3b to
9dc273c
Compare
9dc273c to
fe42bca
Compare
3f06465 to
b9aed56
Compare
|
/publish-java-cdk force=true
|
There was a problem hiding this comment.
let's simplify this.
There was a problem hiding this comment.
simplify
There was a problem hiding this comment.
simplify
There was a problem hiding this comment.
simplify
There was a problem hiding this comment.
nit: we can use string templates
There was a problem hiding this comment.
oh god this is ugly. All because generationId can be 0... 😠
b9aed56 to
165a2e5
Compare
| @@ -63,17 +60,19 @@ protected constructor( | |||
| catalog: ConfiguredAirbyteCatalog, | |||
There was a problem hiding this comment.

What
Migrates S3 to use the async framework.
This accomplishes
How
STTCPW: the old serial process
Specifically, it used a single
SerializedBufferingStrategythat handled creating file buffers by stream w/ format type and enforcing thresholds. State management, etc was handled upstream.So I assigned one newly-created
SerializedBufferingStrategyper async worker per flush.Practically, this means that when a memory buffer reaches threshold, it starts, flushes, and closes a file buffer in a single pass. (This is all handled in
S3DestinationFlushFunction)Review guide
This is going to be the first in a series of breaking-changes for s3, so I'll be stacking pr's.
CHANGES WILL BE MERGEABLE WITH BREAKING CHANGES AFTER 2. 3 and 4 will constitute breaking changes.
Code changes consist of
S3Destination...->S3DestinationAsync...)BaseS3Destination)** NOTE: the flush function is initialized with a SerializedBufferingStragey provider so that no two threads use the same object!
S3DestinationFlushFunction)** convert PartialAirbyteMessage to AirbyteMessage
** new
SerializableBuffermethod for flushing a single stream (so I can flush the buffers as soon as it finishes** "default namespace": the async consumer replaces null namespaces w/ a default taken from the schema, which can break stuff in the s3 code that expects null; So I could either 1) make async accept null OR 2) thread an empty string through S3; I chose the latter to avoid impacting other code, though it is kind of ugly.
User Impact
Local testing shows a 2.5x speedup (from about 10mb/s peak to 25mb/s). However perf metrics collected from production data suggest we won't realize that speedup because few upstream sources perform over 10mb/s. So user impact might be minimal.
I'm not sure if counts or checkpoints are meaningful w/o metadata changes that will be part of the refresh PR? Practical effects of counts is that the platform crashes the sync if they don't line up, so we might see more reliability at the cost of higher failure rates.
BREAKING CHANGES
Technically this isn't a breaking change, but because the Async Consumer is dependent on trace messages to work properly:
Gireesh Sreepathi (@gisripa) is working on this now.
Can this PR be safely reverted and rolled back?
I think? Keep me honest