swamirishi commented on code in PR #7188:
URL: https://github.com/apache/ozone/pull/7188#discussion_r1755878436


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerDoubleBuffer.java:
##########
@@ -437,17 +448,22 @@ private String addToBatch(Queue<Entry> buffer, 
BatchOperation batchOperation) {
    */
   private List<Queue<Entry>> splitReadyBufferAtCreateSnapshot() {
     final List<Queue<Entry>> response = new ArrayList<>();
-
+    final Set<OzoneManagerProtocolProtos.Type> standaloneBatchCmdTypes = 
ImmutableSet.of(
+        OzoneManagerProtocolProtos.Type.SnapshotPurge, 
OzoneManagerProtocolProtos.Type.CreateSnapshot);
+    final List<Function<OMResponse, Boolean>> standaloneBatchConditions =
+        ImmutableList.of(OMResponse::hasCreateSnapshotResponse,

Review Comment:
   done



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerDoubleBuffer.java:
##########
@@ -437,17 +448,22 @@ private String addToBatch(Queue<Entry> buffer, 
BatchOperation batchOperation) {
    */
   private List<Queue<Entry>> splitReadyBufferAtCreateSnapshot() {
     final List<Queue<Entry>> response = new ArrayList<>();
-
+    final Set<OzoneManagerProtocolProtos.Type> standaloneBatchCmdTypes = 
ImmutableSet.of(
+        OzoneManagerProtocolProtos.Type.SnapshotPurge, 
OzoneManagerProtocolProtos.Type.CreateSnapshot);
+    final List<Function<OMResponse, Boolean>> standaloneBatchConditions =
+        ImmutableList.of(OMResponse::hasCreateSnapshotResponse,
+        (omResponse) -> 
standaloneBatchCmdTypes.contains(omResponse.getCmdType()));
     OMResponse previousOmResponse = null;
     for (final Entry entry : readyBuffer) {
+      OMResponse prevResponse = previousOmResponse;
       OMResponse omResponse = entry.getResponse().getOMResponse();
       // New queue gets created in three conditions:
       // 1. It is first element in the response,
       // 2. Current request is createSnapshot request.
       // 3. Previous request was createSnapshot request.

Review Comment:
   done



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