-
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
cdk-java: wait until after table migration before creating the WriteConfig objects #42015
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
6523058
to
469d023
Compare
18f7126
to
2103175
Compare
469d023
to
ac23891
Compare
2103175
to
f5deaa2
Compare
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.
suggested a comment + slightly different structure, lgtm otherwise
) | ||
} | ||
val writeConfigs = mutableListOf<WriteConfig>() |
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.
val writeConfigs = mutableListOf<WriteConfig>() | |
// This list is populated when the OnStartFunction is invoked | |
// which is OK, because it's only used by the flush function | |
// which never runs until after OnStart runs | |
val writeConfigs = mutableListOf<WriteConfig>() |
( 😢 )
@@ -145,11 +145,14 @@ object JdbcBufferedConsumerFactory { | |||
private fun onStartFunction( |
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.
what do you think of having this function return a Pair<OnStartFunction, List<WriteConfig>>
?
fun onStartFunction(): Pair<OnStartFunction, List<WriteConfig>> {
val writeConfigs = mutableList()
val onStartFunction = OnStartFunction { ... populate writeConfigs.... }
return Pair(onStartFunction, writeConfigs)
}
and then in createAsync
, we don't need to create a mutable list manually:
val (onStartFunction, writeConfigs) = onStartFunction(...)
return AsyncStreamConsumer(
outputRecordCollector,
onStartFunction,
JdbcFlushFunction(...writeConfigs...)
...
)
Merge activity
|
ac23891
to
8891c0b
Compare
f5deaa2
to
d489ef3
Compare
8891c0b
to
6893cd7
Compare
d489ef3
to
a14e7b8
Compare
6893cd7
to
c6bb2ed
Compare
a14e7b8
to
f42201e
Compare
f42201e
to
f93854a
Compare
What
How
Review guide
User Impact
Can this PR be safely reverted and rolled back?