void-ptr974 commented on issue #25858:
URL: https://github.com/apache/pulsar/issues/25858#issuecomment-4524449144

   Adding some impact context for this fix.
   
   `ManagedLedger.terminate()` is used as the storage-level seal for a topic. 
Higher-level features rely on the returned position as the final write boundary.
   
   The most direct case is `terminateTopic()`: once it returns `lastMessageId`, 
producers should not be able to get successful publish acks beyond that 
position, and consumers should be able to drain to a stable end-of-topic.
   
   This also matters for scalable topic split/merge, where old parent segments 
are terminated before routing/layout metadata moves forward. If a terminated 
segment can become writable again, messages may be written into a segment that 
the active layout already considers closed.
   
   Cluster migration/cutover is another related case because `asyncMigrate()` 
is built on top of `asyncTerminate()`. The old topic needs a reliable write 
barrier before traffic is redirected or disconnected.
   
   So the fix is about preserving `terminate()` as a dependable write seal, not 
only about avoiding an internal ML state transition race.


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