docstore: Add atomic write single partition conformance test scenario#3681
Merged
Merged
Conversation
…, refactor existing atomic write test flag
Contributor
Author
|
@sandeepvinayak FYI |
Contributor
|
@jba @vangent This is a follow up test scenarios fix after original work in #3501 Even though we covered in the design that cosmos support single partition atomic writes, but existing conformance test was written for multi-partitions. The current tests are successful because cosmos doesn't have recordings or runs in replay mode. So in here instead of broader |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docstore/all: Add atomic write test scenarios to cover cases where transaction is within a single partition using composite IDs. Refactor existing atomic write test flag to return an enum so that atomic write tests can be skipped based on support.
Context:
Different docstores provide varying levels of support for transactions / atomic writes, particularly with respect to partitions. For example, DynamoDB supports transactions that span multiple partitions (i.e., rows within a transaction can have different partition key values), whereas Cosmos DB requires all rows in a transaction to reside within a single partition (the partition key must be identical across all rows in the transaction).
The existing conformance test scenario introduced in PR #3523 only covers the multi-partition case. We should add additional test scenarios to cover single-partition atomic writes, using data with composite IDs/keys.
Additionally, the
SupportsAtomicWrites()check on theHarnessinterface should be refactored to return more granular levels of support—such as no support, single-partition transactions, and multi-partition transactions. This would allow each docstore driver to accurately declare its level of atomic write support in its Harness implementation, enabling conformance tests to be conditionally skipped when a given level of support is not available.