Skip to content

Conversation

@swamirishi
Copy link
Contributor

What changes were proposed in this pull request?

Instead of performing ByteWise comparison on Java side moving the comparison to native side would more optimal since most of the transactions are going to use direct byte buffers. Here we intend to use the rocksdb Slice to perform bytewise comparisons. RocksDB Bytewise comparators also uses the same comparator.
https://github.com/facebook/rocksdb/blob/c110091d368b8a01b5be36a14198769e60786c05/util/comparator.cc#L36-L38
Unfortunately currently in 7.7.3 there is no direct native comparison that has been implemented. We can look into contributing to Rocksdb by having a JNI implementation for

https://github.com/facebook/rocksdb/blob/0bf9079d44eea91afda7151306d3a3439a39511b/java/src/main/java/org/rocksdb/NativeComparatorWrapper.java#L16

Till then this is a nice workaround to have.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14238

How was this patch tested?

Update existing unit tests

@swamirishi swamirishi force-pushed the HDDS-14238 branch 2 times, most recently from e4e5016 to 692b5ed Compare December 24, 2025 13:51
@swamirishi swamirishi force-pushed the HDDS-14238 branch 8 times, most recently from a3349d7 to deb7900 Compare December 25, 2025 05:47
…on for optimization

Change-Id: Ia7655ff5148197be488a2c1151ec7fd1d6f9d452
@swamirishi
Copy link
Contributor Author

@szetszwo This is good to be reviewed. I will click on ready for review when I get a +1. I don't want to run the CI multiple times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant