-
Notifications
You must be signed in to change notification settings - Fork 535
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offline: Detect duplicate sequenced batches and close the container #22310
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
github-actions
bot
added
area: loader
Loader related issues
area: runtime
Runtime related issues
area: tests
Tests to add, test infrastructure improvements, etc
base: main
PRs targeted against main branch
labels
Aug 24, 2024
(ish - had to work around itExpects weirdness)
markfields
added a commit
that referenced
this pull request
Aug 29, 2024
…Batch message to more of the system (#22343) Empty batches are a unique case, where we submit a Grouped Batch message with no inner runtime messages. This is needed for tracking batches between forks of a container (each trying to resubmit the same local content). There are several flows that need the message or at least sequenceNumber-related metadata: * BatchStart/BatchEnd events * DeltaScheduler * savedOps mechanism in PendingStateManager * The DataProcessingError thrown if the container forks * Future (See #22310): MinimumSequenceNumber We used to include the `emptyBatchSequenceNumber` and that partially addressed this, but it's better to include the whole message. So add this as the `keyMessage` to `InboundBatch` type - and for non-empty batches this is just the first message (we were already referring to that in certain places).
Made some material changes to pendingStateManager.spec.ts
markfields
requested review from
anthony-murphy,
dannimad,
a team,
pragya91,
jatgarg,
tyler-cai-microsoft,
kian-thompson and
rajatch-ff
and removed request for
a team
August 30, 2024 23:57
kian-thompson
approved these changes
Sep 3, 2024
⯅ @fluid-example/bundle-size-tests: +5.18 KB
Baseline commit: b2deac2 |
markfields
added a commit
to markfields/FluidFramework
that referenced
this pull request
Sep 26, 2024
Offline: Model empty batches differently, exposing the empty Grouped Batch message to more of the system (microsoft#22343) Empty batches are a unique case, where we submit a Grouped Batch message with no inner runtime messages. This is needed for tracking batches between forks of a container (each trying to resubmit the same local content). There are several flows that need the message or at least sequenceNumber-related metadata: * BatchStart/BatchEnd events * DeltaScheduler * savedOps mechanism in PendingStateManager * The DataProcessingError thrown if the container forks * Future (See microsoft#22310): MinimumSequenceNumber We used to include the `emptyBatchSequenceNumber` and that partially addressed this, but it's better to include the whole message. So add this as the `keyMessage` to `InboundBatch` type - and for non-empty batches this is just the first message (we were already referring to that in certain places).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: runtime
Runtime related issues
area: tests
Tests to add, test infrastructure improvements, etc
base: main
PRs targeted against main branch
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.
Description
Fixes AB#8884
If the same batch is submitted twice in parallel by two rehydrated forks of the same container, the duplicate will get sequenced, and all subsequent clients will need to notice this to avoid applying both copies.
For now, we will simply detect this case and close the container with a DataCorruptionError.