TakaHiR07 opened a new pull request, #25076:
URL: https://github.com/apache/pulsar/pull/25076

   ### Motivation
   
   Occur a NPE issue in delay message. And then find the reason is in 
delayedMessagesCount. When InMemoryDelayedDeliveryTracker#addMessage(), it 
don't judge whether the entryId is exist in roaringbitmap, that result in the 
delayedMessagesCount of the map size is not correct. 
   
   <img width="1261" height="136" 
alt="企业微信截图_bb4f30f2-8829-413d-a7e8-e8746dc07adc" 
src="https://github.com/user-attachments/assets/4a6c1960-728b-4d9b-86c0-c072a2b61a25";
 />
   
   
   ### Modifications
   
   1. add test to test the duplicate entry case 
   2. check whether roaring64Bitmap contains entryId
   3. log error for the case of "n < 0" in getScheduledMessages(), since this 
case should not occur
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   
   ### 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 -->
   
   


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