-
Notifications
You must be signed in to change notification settings - Fork 54
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
adding the forceSync flag for handling conflicting topic configs #170
Conversation
if (forceSync) { | ||
// NOTHING TO DO! | ||
log.info("topic config mismatch for {} ignored. Input config={}, actual (retained) config={}", topic, topicConfigMap, actualTopicConfig); | ||
continue; |
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 exactly is being "forced" if all you do is continue
?
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.
Well, the flag is "forcing" the stream-registry to sync the given topic configs with what exists already on the underlying brokers.
I guess I can say that by continue
ing here, the code is "forcing" the flow to not go ahead to the following exception generation ..
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.
I put alternative names in #114
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.
ignoring any user provided info, and only updating SR with the underlying settings
The way I interpret that is to take actualTopicConfig
and overwrite topicConfigMap
with it... i.e. "forcing" the actual configs to "sync" to the Stream Config
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.
Doesn't continue
actually perform the UPDATE???
I agree with @Cricket007 remarks on actualTopicConfig
and topicConfigMap
... where we should be overriding what the user provided, with what is actually out there.
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.
Doesn't continue actually perform the UPDATE?
No, it breaks here and goes to the next iteration of the loop. updateTopic
isn't called.
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.
Oh. I missed a curly-brace close.
line 270 is INSIDE not... outside the loop.
https://github.com/ExpediaGroup/stream-registry/pull/170/files/09090b33c68b43bf046a36ddd7b7ed2959b849e3#diff-b4dcb632004addc439896ec21e5b7dabR270
Some clarification on
|
Waiting for more info from team before I comment on this PR. |
if (forceSync) { | ||
// NOTHING TO DO! | ||
log.info("topic config mismatch for {} ignored. Input config={}, actual (retained) config={}", topic, topicConfigMap, actualTopicConfig); | ||
continue; |
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.
Doesn't continue
actually perform the UPDATE???
I agree with @Cricket007 remarks on actualTopicConfig
and topicConfigMap
... where we should be overriding what the user provided, with what is actually out there.
Also should |
if (forceSync) { | ||
// NOTHING TO DO! | ||
log.info("topic config mismatch for {} ignored. Input config={}, actual (retained) config={}", topic, topicConfigMap, actualTopicConfig); | ||
continue; |
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.
Oh. I missed a curly-brace close.
line 270 is INSIDE not... outside the loop.
https://github.com/ExpediaGroup/stream-registry/pull/170/files/09090b33c68b43bf046a36ddd7b7ed2959b849e3#diff-b4dcb632004addc439896ec21e5b7dabR270
Here are my comments on the PR:
Why not create topic only at the vpc and not in the replicatedVPC? creating topics in the replicatedVPC is a replication tools task isn't it? |
Since (#178) is merged, this PR is not required. |
stream-registry PR
Adding flag to provide an option to override user-provided topic config in case of already existing conflicting configs on the underlying brokers (#114)
Added
forceSync
which can be set by a user while upserting a stream to override the provided topic configs in the stream and continue using the existing topic configs on the brokers.PR Checklist Forms