Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve polling in segment allocation queue (apache#15590)
Description When batchAllocationWaitTime is set to 0, the segment allocation queue is polled continuously even when it is empty. This would take up cpu cycles unnecessarily. Some existing race conditions would also become more frequent when the batchAllocationWaitTime is 0. This PR tries to better address those race conditions as well. Changes Do not reschedule a poll if queue is empty When a new batch is added to queue, schedule a poll Simplify keyToBatch map Handle race conditions better As soon as a batch starts getting processed, do not add any more requests to it
- Loading branch information