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

   ## Motivation
   
   The `resetCursor(long timestamp)` method was not protected by the 
subscription fencing mechanism (`IS_FENCED_UPDATER`), allowing concurrent reset 
operations to interfere with one another. This may result in performance 
degradation during timestamp-based position lookups, particularly when tiered 
storage is enabled.
   
   ## Modifications
   
   Apply the same fencing mechanism used by `resetCursor(Position)` to 
`resetCursor(long timestamp)` by sharing the internal `resetCursorInternal()` 
method.
   
   ## Verifying this change
   
   - Added unit test `testConcurrentResetCursorByTimestamp` in 
`SubscriptionSeekTest.java`
   - Run: `mvn -pl pulsar-broker 
-Dtest=SubscriptionSeekTest#testConcurrentResetCursorByTimestamp test`
   
   ## Documentation
   
   - [x] `doc-not-needed`


-- 
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