ENG-48445: Added generic filter and optional upsert condition (for optimistic updates)#226
Conversation
Test Results122 tests 122 ✅ 59s ⏱️ Results for commit cc5c1fe. ♻️ This comment has been updated with latest results. |
| // If empty, specified config is associated with a default context. | ||
| string context = 4; | ||
|
|
||
| //optional - only required when we want to have optimistic locking for update |
There was a problem hiding this comment.
Can you describe how this behaves if no config exists (the create side of upsert)? Does it always pass? always fail? And the optimistic locking is more of a use case description, i'd drop it.
| //optional - only required when we want to have optimistic locking for update | |
| // an optional condition that must pass in order for an update operation to succeed. If the target record does not exist... |
There was a problem hiding this comment.
i am think to have this conditional update only when the Filter field is present (which uses doc store update method)
other case like create and update with no filter can work as it is (current uses doc store upsert method which is deprecated i can use createOrReplace method instead)
There was a problem hiding this comment.
makes sense. Just need to reject the create + filter case with validation
Description
Please include a summary of the change, motivation and context.
Testing
Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.
Checklist:
Documentation
Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.