poorbarcode opened a new pull request, #23615: URL: https://github.com/apache/pulsar/pull/23615
### Motivation We encountered an issue as follows | time | `closing topic -> closing curosr` | `in-progress cursor mark deleting` | | --- | --- | --- | | 1 | Mark the cursor as closing | | 2 | Persistent cursor metadata into the cursor ledger `54781383` | | 3 | Start to close the cursor ledger `54781383` | | 4 | Mark the ledger `54781383` is closed in memory | | 5 | | Try to write metadata to the ledger `54781383`, but the ledger was marked closed | | 6 | | Try to write metadata to ZK after failed writing BK | | 7 | Start to write the ledger metadata of `54781383` to ZK | | 8 | | The ZK server closed the connection due to the pulsar trying to write a large value | | 9 | Write to ZK failed due to the connection being lost | | | 10 | | retries and keeps triggering a closing of the ZK connection | | 11 | The retries will fail because the connection is unstable| I think we need at least two fixes - (What this current PR attempts to do) Do not continue executing the in-progress cursor mark deletion after the cursor is closed. - (I will push another PR to do it)Add a mechanism that limits the data size that will persist with ZK. ### Modifications - Skip to persist cursor info if it failed by cursor closed - [ ] TODO: I will write a test tomorrow. ### 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 --> ### Matching PR in forked repository PR in forked repository: x -- 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]
