congbobo184 opened a new pull request #13209: URL: https://github.com/apache/pulsar/pull/13209
## Motivation now, we recover transaction sequenceId from lastConfirmEntry or managedLedger properties. But update managedLedger properties is not a Synchronize op, so it will recover error sequenceId. ### Modifications use ManagedLedgerInterceptor will fix this problem. 1. use interceptor.onUpdateManagedLedgerInfo, when ledger roll over, it will update current sequenceId to managedLedger properties. 2. use interceptor.onManagedLedgerPropertiesInitialize, first we will recover sequenceId from managedLedger properties. 3. use interceptor.onManagedLedgerLastLedgerInitialize, when tc recover and has a effective lastConfirmEntry, we will change the sequenceID after interceptor.onManagedLedgerPropertiesInitialize 4. If a new TC, it can't recover from interceptor.onManagedLedgerPropertiesInitialize and interceptor.onManagedLedgerLastLedgerInitialize, it will use the initial sequenceId -1 ### Verifying this change Add the tests for it Does this pull request potentially affect one of the following parts: If yes was chosen, please highlight the changes Dependencies (does it add or upgrade a dependency): (no) The public API: (no) The schema: (no) The default values of configurations: (no) The wire protocol: (no) The rest endpoints: (no) The admin cli options: (no) Anything that affects deployment: (no) -- 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]
