Hi Yubiao:1. kick out all the connected Shared producers. This same as the mode ExclusiveWithFencing, so the mode WaitForExclusive is no longer needed.I agree this, but that doesn't mean we don't need `WaitForExclusive` . If there was a producer of Exclusive before, WaitForExclusive still has to wait.Baodi Shi
Thanks2022年11月10日下午4:39,Yubiao Feng <yubiao.f...@streamnative.io.INVALID> 写道:Hi EnricoI think that we should kick out all the connected Shared producers.The competition is among Exclusive producers and Shared don't play the game.Yes, Mode "ExclusiveWithFencing" does this. I think that WaitForExclusiveis a soft form of occupation. Just like the read and writer lock, thewriter takes the write lock after all readers released the read lock.This looks like a bug to me.I agree. If some shared producers already exist, then try to registera WaitForExclusive-Modeproducer. we have 3 ways:1. kick out all the connected Shared producers. This same as the modeExclusiveWithFencing, so the mode WaitForExclusive is no longer needed.2. just append the new producer to the waiting queue, and take over as thenew exclusive producer after all shared producers are offline.3. Reject the registration request of the new WaitForExclusive-Mode producer.there has been a pr attempt to do so(#18380).I prefer the second approach because it provides new usage and is closer tothe original design.On Thu, Nov 10, 2022 at 3:13 PM Enrico Olivelli <eolive...@gmail.com> wrote:Yubiao,Il Gio 10 Nov 2022, 07:40 Yubiao Feng <yubiao.f...@streamnative.io.invalid>ha scritto:> Hi all,>> Now if an Exclusive-Mode producer has been registered, we can register> another WaitForExclusive-Mode producer. When the old producer goes> offline, the new producer will take over as the new exclusive producer.>> < Highlight >But if some Shared-Mode producers have been registered, wecan> register another WaitForExclusive-Mode producer too, but even if all> Shared-Mode goes offline, the new producer will not take over as the new> exclusive producer.This looks like a bug to me.When you start a xxxx-Exclusive producer you want to take control over thetopic.I think that we should kick out all the connected Shared producers.The competition is among Exclusive producers and Shared don't play thegame.The fix should be easyEnricoThen, if we register a new WaitForExclusive-Mode> producer, the earlier WaitForExclusive-Mode producer will take over asthe> new exclusive producer.>> < Highlight >I want to make the behavior of producers that use the mode> WaitForExclusive clear: When no other mode of producer exists for atopic,> the first producer in the WaitForExclusive queue can auto succeeds as the> exclusive producer.>> Thanks> Yubiao>