szetszwo commented on code in PR #9552:
URL: https://github.com/apache/ozone/pull/9552#discussion_r2653719535
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBBatchOperation.java:
##########
@@ -136,15 +137,29 @@ public void close() {
}
private abstract static class Op implements Closeable {
+ private final CodecBuffer keyBuffer;
private final Bytes keyBytes;
+ private final AtomicBoolean closed = new AtomicBoolean(false);
+
+ private Op(CodecBuffer keyBuffer) {
+ this.keyBuffer = keyBuffer;
+ this.keyBytes = keyBuffer == null ? null : Bytes.newBytes(keyBuffer);
Review Comment:
Actually, deleteRange is a very different operation. We should either
- don't make it extends Op, or
- add one more intermediate class, say SingleKeyOp. Then, DeleteRangeOp
extends Op and all other op extend SingleKeyOp.
--
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]