sadanand48 commented on code in PR #11190:
URL: https://github.com/apache/ozone/pull/11190#discussion_r4123350735


##########
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:
   Added ozoneManagerDoubleBuffer.releaseUnFlushedTransactions(1); in the catch 
(RuntimeException ex) path before exitApplyTransaction() and rethrow.



-- 
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]

Reply via email to