[fix][broker] WaitForExclusive should fenced when exist Shared producer. - #18380
[fix][broker] WaitForExclusive should fenced when exist Shared producer.#18380shibd wants to merge 1 commit into
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18380 +/- ##
============================================
+ Coverage 40.04% 45.48% +5.43%
- Complexity 8625 10809 +2184
============================================
Files 687 757 +70
Lines 67436 74036 +6600
Branches 7221 8116 +895
============================================
+ Hits 27007 33675 +6668
+ Misses 37411 36594 -817
- Partials 3018 3767 +749
Flags with carried forward coverage won't be shown. Click here to find out more.
|
poorbarcode
left a comment
There was a problem hiding this comment.
No, I don't agree. The user should have a scenario like this:
Users used multiple producers before and need to change to Exclusive now. In this case, if users want to smooth over, users need the coexistence of the producers of both modes Shared(old) and Exclusive(new)
I think we should keep the |
eolivelli
left a comment
There was a problem hiding this comment.
I think that a Exclusive producer should fence out all of the existing shared producers.
The point of WaitForExclusive is the you want to take control over the topic, but wait if there is another Exclusive producer connected or enquired as WaitForExclusive.
Isn't direct fencing a bit forcible? If the user wants to fence all existing |
eolivelli
left a comment
There was a problem hiding this comment.
I am not sure that we agree on this change.
A WaitForExclusive producer cannot complete by throwing 'Fenced'.
You are Fenced after becoming the owner, but in this case the Producer was never been elected as owner of the topic.
I think that we should behave like Exclusive and ExclusiveWithFencing: if there are Shared producers they must be disconnected and fail
|
@eolivelli Thanks for your reply.
In fact, Exclusive's current behavior is that when it encounters has shared producer, it will fence itself. In my opinion, this scenario occurs when the user connects to the wrong topic. We should tell Exclusive/WaitForExclusive producers about the exception of existing shared producers, rather than fence existing shared producers. |
|
my point is if the share producer connects first, the |
|
The pr had no activity for 30 days, mark with Stale label. |
Motivation
In the current implementation, if a
SharedProducer is created first, and can be again created successfully a producer of theWaitForExclusive.It's confuse. Because even if the
Sharedproducer is disconnected, it will not trigger theWaitForExclusiveproducer to become exclusive.Modifications
WaitForExclusiveproducer should fence when existingSharedproducer.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: shibd#20