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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
DynamoStore: Feed all appends through tip #401
Merged
Merged
Conversation
This file contains 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
bartelink
changed the title
Feed new writes through tip
DynamoStore: Feed all appends through tip
Jun 29, 2023
This was referenced Jul 4, 2023
* Handle nulls when unpacking Equinox.DynamoStore.Core.Token.isStale
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.
Resolves #403; Adjusts the write algorithm to ensure all newly appended events are always first written to the tip (as opposed to potentially going straight to a calf batch as they do in the Cosmos impl, which would generally be more optimal both in RU cost and in density of events per Batch/Item in the store)
This is to enable downstream consumers of the DDB Streams (including
Propulsion.DynamoStore.Indexer
) to be guaranteed to see all appends for a given stream in the correct order.Prompted by observations and analysis by @epNickColeman that writes to non-tip events (calved batches) were arriving out of order under non-trivial write load (previous load tests had not included triggering the calving of ). On closer investigation, the documentation for DDB Streams turns out to be written very tightly to only guarantee ordering at the individual item level, not for relative positions of writes to the same logical partition (even in a transactional batch).
While the commits here bear my name, Nick and I paired on the implementation and cleanup, and the actual leg of work of figuring out the problem, convincing me it was real, and what the core of the fix needed to be was entirely due to his time, effort and insight 馃檶