zhouxinyu commented on issue #220: [ROCKETMQ-332] 
MappedFileQueue#findMappedFileByOffset is not thread safe, which will cause 
message loss.
URL: https://github.com/apache/rocketmq/pull/220#issuecomment-358703148
 
 
   @Jason918  We must consider the below cases if we adopt the retry strategy:
   1. How many times? 
   2. What's the next step if we only retry a specific number and failed again?
   3. It may increase the CPU load and block time if we retry indefinitely.
   4. How to avoid the stack overflow risk if we retry recursively?
   
   While there is another method to fix the bug: Hold the first mapped file to 
hang up the delete process. But this method couldn't handle the forcible 
deletion case.
   
   So iteration is a tradeoff method, consider that the probability of 
iterating through the array is very small and the size of the array is fewer 
than one thousand in most cases.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to