Copilot commented on code in PR #11190:
URL: https://github.com/apache/ozone/pull/11190#discussion_r4050208801
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java:
##########
@@ -548,6 +573,13 @@ public synchronized void pause() {
getLifeCycle().transition(LifeCycle.State.PAUSED);
}
+ pauseApplyTransaction();
+ try {
+ ozoneManagerDoubleBuffer.awaitFlush();
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ LOG.warn("Interrupted while waiting for OM double buffer to flush during
pause.", ex);
+ }
ozoneManagerDoubleBuffer.stop();
Review Comment:
This catch restores the interrupt flag and then stops the double buffer
without waiting for the flush to finish. During checkpoint installation, that
can discard buffered responses and replace the DB from stale state even though
`pause()` returned successfully; preserve the interrupt status but continue
waiting (or fail before stopping) so the pause guarantee remains true.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]