Skip to content
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 12 commits into from Jul 5, 2023
Merged

DynamoStore: Feed all appends through tip #401

merged 12 commits into from Jul 5, 2023

Conversation

bartelink
Copy link
Collaborator

@bartelink bartelink commented Jun 28, 2023

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 馃檶

@bartelink bartelink marked this pull request as ready for review July 5, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DynamoStore: Needs to write through tip to guarantee order on DDB streams
2 participants