szetszwo commented on code in PR #4424:
URL: https://github.com/apache/ozone/pull/4424#discussion_r1147020674


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBBatchOperation.java:
##########
@@ -39,26 +246,38 @@ public RDBBatchOperation(ManagedWriteBatch writeBatch) {
     this.writeBatch = writeBatch;
   }
 
+  @Override
+  public String toString() {
+    return name;
+  }
+
   public void commit(RocksDatabase db) throws IOException {
+    debug(() -> String.format("%s: commit %s",
+        name, opCache.getCommitString()));
+    opCache.prepareBatchWrite();
     db.batchWrite(writeBatch);
   }
 
   public void commit(RocksDatabase db, ManagedWriteOptions writeOptions)
       throws IOException {
+    debug(() -> String.format("%s: commit-with-writeOptions %s",
+        name, opCache.getCommitString()));
+    opCache.prepareBatchWrite();

Review Comment:
   I guess you mean changing the classes to `static`?  I actually start with 
`static` and passing `writeBatch` around.  The `static` keywords were removed 
when printing the debug messages with the `name`.  It does not look good to 
pass also the `name` around.



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