[fix][broker] Inconsistent behaviour for topic auto_creation#20843
Merged
mattisonchao merged 3 commits intoapache:masterfrom Jul 21, 2023
mattisonchao:fix/auto_creation_inconsistent_behavior
Merged
[fix][broker] Inconsistent behaviour for topic auto_creation#20843mattisonchao merged 3 commits intoapache:masterfrom mattisonchao:fix/auto_creation_inconsistent_behavior
mattisonchao merged 3 commits intoapache:masterfrom
mattisonchao:fix/auto_creation_inconsistent_behavior
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #20843 +/- ##
============================================
+ Coverage 72.97% 73.09% +0.12%
- Complexity 32157 32176 +19
============================================
Files 1868 1868
Lines 139164 139185 +21
Branches 15314 15315 +1
============================================
+ Hits 101555 101742 +187
+ Misses 29562 29373 -189
- Partials 8047 8070 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
poorbarcode
approved these changes
Jul 21, 2023
coderzc
approved these changes
Jul 21, 2023
Technoboy-
approved these changes
Jul 21, 2023
codelipenghui
approved these changes
Jul 21, 2023
This was referenced Jul 25, 2023
Technoboy-
pushed a commit
that referenced
this pull request
Aug 17, 2023
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.
Motivation
Auto-creation topicsmechanism relies on namespace policies which are very important for the broker to determine if we should auto createpartitionedtopic ornon-partitioendtopic.We can't rely on the cache to get the random result. We should always load data from zk if the cache is missed to avoid fallback to broker default configuration.
e.g. If the metadata cache is missed, the logic will fallback to use broker configuration.
Broker configuration:
Namespace policies:
Modifications
Verifying this change
Documentation
docdoc-requireddoc-not-neededdoc-complete