Repository navigation
Conversation
The DynamoDB store wrote the string "null" as the item of a deleted flag or
segment. SDKs in other languages and the Relay Proxy fail a whole bulk read
on that value. Store the SDK's serialized tombstone ({"version":N,"deleted":true})
instead, as the Redis and Consul stores do. The store still reads "null" as a
deleted item, so tables written by older versions keep working.
Remove the contract test suppression for DynamoDB data source deletions.
Generated-by: termag
This branch has not been deployed
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.
Summary
The DynamoDB store wrote the
itemattribute of a deleted flag or segment as the string"null". Other SDKs that read the same table fail on it: the Go SDK and the Relay Proxy fail the whole read of the kind, Python'sall()raises, Ruby raises, and PHP'sgetAllFeaturesthrows a TypeError.The store now writes the tombstone JSON that the SDK passes in,
{"version":N,"deleted":true}, the same as the Redis and Consul stores. If the serialized item is null, it builds the same JSON from the data kind. It still reads a"null"item as deleted, so tables written by older versions keep working. New unit tests cover the stored tombstone on upsert and init, and the legacy placeholder throughgetandgetAll.The contract test service uses the published DynamoDB store, so the
persistent data store/dynamodb/read-write/data source deletions respect versioningsuppression stays until a release with this fix is out and the service's store version is bumped. Against a local build of this store, that test passes on the v2 and v3 harness.Opened from termag