lhotari opened a new pull request, #23424:
URL: https://github.com/apache/pulsar/pull/23424

   ### Motivation
   
   PIP-379 contains:
   > Slightly unrelated to PIP-379 changes, there's a need to ensure that users 
upgrading from Pulsar 3.x can revert to the "recently joined consumers" logic 
(before PIP-282) in case of possible regressions caused by PIP-379. Since 
PIP-282 is also new in Pulsar 4.0.0, there needs to be a feature flag that 
toggles between the PIP-379 implementation for Key_Shared and the "recently 
joined consumers" logic before PIP-282. Implemention details for this feature 
toggle can be handled in the pull request for implementing this.
   
   This PR copies PersistentDispatcherMultipleConsumers and 
PersistentStickyKeyDispatcherMultipleConsumers classes from branch-3.3 adds the 
feature flag.
   
   ### Modifications
   
   - Add configuration options:
     - `subscriptionKeySharedUseClassicPersistentImplementation` - For 
persistent Key_Shared subscriptions, enables the use of the classic 
implementation of the Key_Shared subscription that was used before Pulsar 4.0.0 
and PIP-379
     - `subscriptionSharedUseClassicPersistentImplementation` - For persistent 
Shared subscriptions, enables the use of the classic implementation of the 
Shared subscription that was used before Pulsar 4.0.0.
   - extract `AbstractPersistentDispatcherMultipleConsumers` class to be shared 
by PersistentDispatcherMultipleConsumers and 
PersistentDispatcherMultipleConsumersClassic
   - add interface `StickyKeyDispatcher` which is implemented by both 
PersistentStickyKeyDispatcherMultipleConsumers and 
PersistentStickyKeyDispatcherMultipleConsumersClassic
   - Restore `readPositionWhenJoining` from state before PIP-282
   - Restore `consumersAfterMarkDeletePosition`  from state before PIP-282
   - Add method `isClassic()` that can be used to detect the dispatcher 
implementation type
   - Rename duplicate KeySharedSubscriptioTest to 
KeySharedSubscriptionMaxUnackedMessagesTest
   - Don't require hash in replay with classic implementations
   - Use Integer.MAX_VALUE-1 as the range end in classic and consistent hashing
   - Implement test parameterization solution KeySharedImplementationType with 
works with TestNG tests
   - Test both PIP-379 and Classic in KeySharedSubscriptionTest using the test 
parameterization solution
   - Test both PIP-379 and Classic in 
KeySharedSubscriptionMaxUnackedMessagesTest using the test parameterization 
solution
   - Reduce test flakiness
     - Revisit receiveAndCheckDistribution to use multiple threads for 
receiving simultaneously
   - Copy unit tests for PersistentDispatcherMultipleConsumersClassic and 
PersistentStickyKeyDispatcherMultipleConsumersClassic from branch-3.3
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to