-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Feature Request: support ReturnValuesOnConditionCheckFailure
#245
Comments
Oh nice, I didn't know this existed (is it new?). I will add it for sure. |
PR here: #246. Wasn't sure whether it was better to have an API that works based off the errors or another method on the operations so I did both :-) |
* support ReturnValuesOnConditionCheckFailure (#245) * add IncludeItemInCondCheckFail and friends * add IncludeItemInCondCheckFail to ConditionCheck
Just released in v2.2.0. Let me know if you run into any issues |
Thanks! |
The write operations which support
ReturnValues
(PutItem, UpdateItem, DeleteItem, transactional equivalents thereof, and possibly others) generally also supportReturnValuesOnConditionCheckFailure
, which can take a value ofALL_OLD
to get a strongly consistent read for free (in terms of capacity cost) even if the write was semantically rejected.This is pretty useful from an atomics perspective, i.e. inspecting the item in a guaranteed state to find out why the condition check failed, all without needing to perform a potentially racing followup read.
Here is a non-complete list of the operations that support this (at least the ones I care most about), and the relevant docs/code:
The text was updated successfully, but these errors were encountered: