• M
    Split message ranges by ledger ID and store them in individualDeletedMessages (#7861) · 0b7f034e
    Masahiro Sakamoto 提交于
    Fixes #7554
    
    ### Motivation
    
    As mentioned in #7554, the class of `individualDeletedMessages` is different between Pulsar 2.3.2 (and earlier) and 2.4.0 (and later). This causes some of ranges contained in `individualDeletedMessages` to be lost when the version of Pulsar is upgraded, and a large number of messages that have already been acked can be redelivered to consumers.
    
    Also, even if the Pulsar version is 2.4.0 or later, the same phenomenon occurs when the value of `managedLedgerUnackedRangesOpenCacheSetEnabled` is switched from false to true.
    
    ### Modifications
    
    If the list of individually deleted message ranges loaded from ZK contains ranges that span different ledgers, split the ranges by ledger ID and store them in `individualDeletedMessages`.
    
    As a result, information about deleted message ranges is never lost and messages that have already been acked will not be redelivered.
    0b7f034e
ManagedCursorIndividualDeletedMessagesTest.java 5.8 KB