vamossagar12 commented on a change in pull request #10798: URL: https://github.com/apache/kafka/pull/10798#discussion_r703336198
########## File path: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java ########## @@ -505,6 +506,14 @@ private void closeOpenIterators() { } } + private ByteBuffer createDirectByteBufferAndPut(byte[] bytes) { + ByteBuffer directBuffer = ByteBuffer.allocateDirect(bytes.length); Review comment: > Also, we should try to avoid serializing data into byte[] arrays and then copy the data into directBuffers. Instead we should serialize directly into "direct" ByteBuffers. For this we might need to have RocksDBStore implement a ByteBuffer interface, e.g., KeyValueStore<Bytes, ByteBuffer>, or anything similar... Yeah.. I did play around with that idea, but the idea was to not change the public APIs. If that makes sense and I can do another round of benchmarking for that, then probably, we will need a KIP. Infact, we could even go one step ahead and add support for only DirectByteBuffers if that makes sense. We can throw errors if the ByteBuffer isn't direct for example- similar to the rocksdb implementation. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org