-
Notifications
You must be signed in to change notification settings - Fork 111
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
[CLIENT-3121] Support multi-record transactions #674
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #674 +/- ##
==========================================
- Coverage 80.89% 80.79% -0.10%
==========================================
Files 100 102 +2
Lines 15053 15173 +120
==========================================
+ Hits 12177 12259 +82
- Misses 2876 2914 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Approved
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 good! I left a few nitpicks and have another thought. What do you think about making the mrt_commit_status_constants a class that subclasses enums.IntEnum? That way the user can tell what valid values are for those return codes through their IDE. This might not be easy to do and include in the base aerospike package since it is a C extension. If you have to define the class in C, I'd say it's not worth it. Let me know what you think.
#include "types.h" | ||
#include "client.h" | ||
|
||
PyObject *AerospikeClient_Commit(AerospikeClient *self, PyObject *args, |
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.
I'm fine with either method
Yeah it takes some effort to write an inheriting class in C; the C-API doesn't provide an API to create Enums. I was going to make a "dummy" package called aerospike and move the C-Python extension aerospike into that package, so we can declare types in Python using |
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.
LGTM
Regression Testing
Extra changes:
CI/CD
Misc
Documentation changes:
https://aerospike-python-client--674.org.readthedocs.build/en/674/client.html#multi-record-transactions
https://aerospike-python-client--674.org.readthedocs.build/en/674/transaction.html
https://aerospike-python-client--674.org.readthedocs.build/en/674/index.html
Extra changes:
Cluster API breaking change: tran_count to command_count
todo