oneby-wang opened a new pull request, #25803: URL: https://github.com/apache/pulsar/pull/25803
### Motivation This is a follow-up to apache/pulsar#25165 and the same class of mark-delete properties race condition, covering `PersistentMessageExpiryMonitor.findEntryComplete()`. `PersistentMessageExpiryMonitor.findEntryComplete()` may lose mark-delete properties in a race condition. When the expiry monitor advances a cursor while another `markDelete()` call with properties is in progress, passing the cursor current properties can capture stale properties and later overwrite the user-provided mark-delete properties. ### Modifications 1. Add `testExpireMessagesNeverLoseMarkDeleteProperties()` test to reproduce the issue. 2. Pass `null` to `asyncMarkDelete()` method properties param in `PersistentMessageExpiryMonitor.findEntryComplete()`, so the cursor uses the latest properties when the mark-delete is applied. 3. Run test to verify the code change. ### Verifying this change - [x] Make sure that the change passes the CI checks. ### Does this pull request potentially affect one of the following parts: <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> *If the box was checked, please highlight the changes* - [ ] Dependencies (add or upgrade a dependency) - [ ] The public API - [ ] The schema - [ ] The default values of configurations - [ ] The threading model - [ ] The binary protocol - [ ] The REST endpoints - [ ] The admin CLI options - [ ] The metrics - [ ] Anything that affects deployment ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` - [ ] `doc-required` - [x] `doc-not-needed` - [ ] `doc-complete` ### Matching PR in forked repository PR in forked repository: https://github.com/oneby-wang/pulsar/pull/33 -- 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]
