yuz10 commented on PR #8766:
URL: https://github.com/apache/rocketmq/pull/8766#issuecomment-2440699800

   > 1. The original implementation uses one-shot(at most 16 results) multi-get 
to simulate iterator; The outcome iterator fails to return all results, thus, 
does not fit well for the mentioned use case;
   > 2. You change is to use lazy single get to iterate; and use potential 
pre-fetch to accelerate;
   > 3. A third option is to directly wrap RocksIterator with prefix;
   > 
   > It would be best to make further comparisons in terms of performance(why 
multi-get at present), code maintenance, ... After all pros and cons are 
clarified, we may finalize this pull request.
   > 
   > Another issue is option 2, aka, this pull request, changes original 
behavior. We need to verify the change does not impact semantics of upper layer 
code bases.
   
   I did not compare the performance of RocksIterator with current solution, It 
can be optimized later, the current solution just deals with the issue of delay 
message. Another solustion is not to sleep 100ms after each iteration.
   As for the behavior, the default ConsumeQueue only iters one file, the 
RocksDBConsumeQueue only iters at most 16 items. so I think the behavior is not 
defined about how many items the iteration returns. and will not impact upper 
layer code.


-- 
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: commits-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to