New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose OccValidationPolicy to the Java API #12547
base: main
Are you sure you want to change the base?
Conversation
Hi @vjeko! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
d08cbc5
to
c082d35
Compare
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. Some small things need changing. We also need JUnit tests to accompany the code please?
java/src/main/java/org/rocksdb/OptimisticTransactionDBOptions.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/rocksdb/OptimisticTransactionDBOptions.java
Outdated
Show resolved
Hide resolved
Thanks for taking a look! Yes, that was the plan. I'll ping you once the CL is considered finished. Thanks again! |
6e018a8
to
6c20910
Compare
6c20910
to
907ba38
Compare
Hi @adamretter -- the CL is ready for review. Would you mind taking another look? Thanks! |
@adamretter Just checking to see if you have time to review this CL? Thanks! |
switch (policy) { | ||
case 0x0: | ||
return ROCKSDB_NAMESPACE::OccValidationPolicy::kValidateSerial; | ||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above on fall-through
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
* | ||
* @return The type of OCC Validation Policy used. | ||
*/ | ||
OccValidationPolicy getOccValidationPolicy() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function scope should be "public" and not "package-private"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getters in RocksJava are typically not prefixed get
- see other classes for the naming convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
java/src/main/java/org/rocksdb/OptimisticTransactionDBOptions.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking much better - just a couple of small fixes needed.
Allow users of RocksDB JNI to specify the OCC Validation Policy when using OptimisticTransactionOptionsDB.
907ba38
to
15fff9e
Compare
@adamretter Could you take a look again? Thanks! |
Allow users of RocksDB JNI to specify the OCC Validation Policy when using OptimisticTransactionOptionsDB.