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


##########
hadoop-hdds/rocks-native/src/main/java/org/apache/hadoop/hdds/utils/db/ManagedRawSSTFileIterator.java:
##########
@@ -63,41 +73,46 @@ public T next() {
       throw new NoSuchElementException();
     }
 
-    KeyValue keyValue = new KeyValue(this.type.readKey() ? 
this.getKey(nativeHandle) : null,
+    KeyValue keyValue = new KeyValue(this.type.readKey() ? 
this.keyBuffer.getFromDb() : null,
         UnsignedLong.fromLongBits(this.getSequenceNumber(this.nativeHandle)),
         this.getType(nativeHandle),
-        this.type.readValue() ? this.getValue(nativeHandle) : null);
+        this.type.readValue() ? this.valueBuffer.getFromDb() : null);
     this.next(nativeHandle);
     return this.transformer.apply(keyValue);
   }
 
   private native void closeInternal(long handle);
 
   @Override
-  public void close() {
+  public synchronized void close() {
     this.closeInternal(this.nativeHandle);

Review Comment:
   closeInternal is idempotent we should not move it into the atomic move to 
fix memory leaks if the close fails for some reason.



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