[fix][broker] In replication scenario, remote consumer could not be registered if there has no message was sent#20888
Merged
poorbarcode merged 3 commits intoapache:masterfrom Jul 28, 2023
Conversation
…registered if there has no message was sent
codelipenghui
approved these changes
Jul 27, 2023
Comment on lines
+1296
to
+1298
| * TODO: I think this design should be improved: if a producer used "AUTO_PRODUCE_BYTES" schema, we should allow | ||
| * the new consumer to register new schema. But before we can solve this problem, we need to modify | ||
| * "CmdProducer" to let the Broker know that the Producer uses a schema of type "AUTO_PRODUCE_BYTES". |
Contributor
There was a problem hiding this comment.
Yes, I agree. It should be the right solution. Please help create an issue to track the following fix.
…neWayReplicatorTest.java Co-authored-by: Penghui Li <penghui@apache.org>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #20888 +/- ##
=============================================
+ Coverage 34.70% 73.11% +38.40%
- Complexity 12078 32226 +20148
=============================================
Files 1697 1874 +177
Lines 129786 139377 +9591
Branches 14157 15328 +1171
=============================================
+ Hits 45037 101899 +56862
+ Misses 78757 29402 -49355
- Partials 5992 8076 +2084
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
nodece
approved these changes
Jul 28, 2023
poorbarcode
added a commit
that referenced
this pull request
Jul 28, 2023
…egistered if there has no message was sent (#20888) Motivation: In the replication scenario, we want to produce messages on the native cluster and consume messages on the remote cluster, the producer and consumer both use a same schema, but the consumer cannot be registered if there has no messages in the topic yet.The root cause is that for the remote cluster, there is a producer who has been registered with `AUTO_PRODUCE_BYTES` schema, so there is no schema to check the compatibility. Modifications: If there is no schema and only the replicator producer was registered, skip the compatibility check. (cherry picked from commit 9be0b52)
poorbarcode
added a commit
that referenced
this pull request
Jul 28, 2023
…egistered if there has no message was sent (#20888) Motivation: In the replication scenario, we want to produce messages on the native cluster and consume messages on the remote cluster, the producer and consumer both use a same schema, but the consumer cannot be registered if there has no messages in the topic yet.The root cause is that for the remote cluster, there is a producer who has been registered with `AUTO_PRODUCE_BYTES` schema, so there is no schema to check the compatibility. Modifications: If there is no schema and only the replicator producer was registered, skip the compatibility check. (cherry picked from commit 9be0b52)
poorbarcode
added a commit
that referenced
this pull request
Jul 28, 2023
…egistered if there has no message was sent (#20888) Motivation: In the replication scenario, we want to produce messages on the native cluster and consume messages on the remote cluster, the producer and consumer both use a same schema, but the consumer cannot be registered if there has no messages in the topic yet.The root cause is that for the remote cluster, there is a producer who has been registered with `AUTO_PRODUCE_BYTES` schema, so there is no schema to check the compatibility. Modifications: If there is no schema and only the replicator producer was registered, skip the compatibility check. (cherry picked from commit 9be0b52)
2 tasks
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
In the replication scenario, we want to produce messages on the native cluster and consume messages on the remote cluster, the producer and consumer both use a same schema, but the consumer cannot be registered if there has no messages in the topic yet.
The root cause is that for the remote cluster, there is a producer who has been registered with
AUTO_PRODUCE_BYTESschema, so there is no schema to check the compatibility.Modifications
If there is no schema and only the replicator producer was registered, skip the compatibility check.
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x