Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log_eviction_stm: fix shutdown hang with full queue
Scenario: * delete-records enters the queue for offset 10 * 3 more storage events enter the queue (queue is now full) * delete-records attempts to enter the queue for offset 15 * shutdown begins * consensus gate is closed. other persisted_stms can no longer make readers, can’t move forward their max collectible offset * eviction event 10 repeats indefinitely in the event processing loop * log_eviction_stm is stuck in apply trying to enqueue * consensus cannot be stopped because a reader is kept open as we stuck in apply Solution: A temporary, not pretty solution, is in this commit which tries to determine if raft is in the process of shutting down, in which case, the eviction stm does so too before it is officially asked to stop. Signed-off-by: Noah Watkins <[email protected]>
- Loading branch information