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


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBSstFileWriter.java:
##########
@@ -71,6 +83,17 @@ public void delete(byte[] key) throws RocksDatabaseException 
{
     }
   }
 
+  public void delete(CodecBuffer key) throws RocksDatabaseException {
+    try (ManagedDirectSlice slice = new 
ManagedDirectSlice(key.asReadOnlyByteBuffer())) {

Review Comment:
   This should not be used anywhere in the code. This can lead to undefined 
behaviour as the DirectSlice doesn't initialize with the ByteBuffer's position 
and remaining position. It starts from position: 0 and size of the byteBuffer. 



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