refactor: extract can_safely_apply() and improve IOState documentation#1713
refactor: extract can_safely_apply() and improve IOState documentation#1713lichuang wants to merge 1 commit intodatabendlabs:mainfrom
Conversation
Refactor the "leader safety invariant" check in Engine into a dedicated IOState::can_safely_apply() method. This makes the safety condition more explicit and testable. Add comprehensive documentation explaining: - The Engine/Runtime separation architecture (logical vs physical state) - The three-stage I/O progress model (accepted/submitted/flushed) - The monotonicity invariant: accepted >= submitted >= flushed - The leader safety invariant for safe log application
|
Thanks for the refactoring — extracting 1. Prefer inline condition over
|
I'm closing this PR due to the above considerations |
Refactor the "leader safety invariant" check in Engine into a dedicated IOState::can_safely_apply() method. This makes the safety condition more explicit and testable.
Add comprehensive documentation explaining:
Checklist
This change is