Don't allow FlushModeExperimental.Async if the loader does not support reference sequence numbers#14239
Merged
andre4i merged 30 commits intomicrosoft:mainfrom Feb 21, 2023
Merged
Conversation
vladsud
reviewed
Feb 17, 2023
|
|
||
| updateDirtyContainerState(dirty: boolean): void; | ||
|
|
||
| readonly supportedFeatures?: ReadonlyMap<string, unknown>; |
Contributor
There was a problem hiding this comment.
(Mostly talking aloud)
I believe it's right approach, but I do not know how to think about documentation here.
I.e. we should fully support parallel implementations of IRuntime, or vice versa - IContainerContext, including by 3rd parties. It's not very clear what needs to be done here RE properly documenting all the properties we are exposing here, as their timeframe (i.e. I totally expect exposure of features to be "sunset" once we have 100% saturation of new bits, i.e. the need to check for feature presents to go away)
vladsud
reviewed
Feb 17, 2023
vladsud
reviewed
Feb 17, 2023
Collaborator
⯅ @fluid-example/bundle-size-tests: +498 Bytes
Baseline commit: 3132fbd |
vladsud
approved these changes
Feb 21, 2023
This was referenced Apr 28, 2026
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.
Description
With
FlushMode==FlushModeExperimental.Async, batches will be flushed across JS turns, drastically increasing the chances of ending up in states with mismatched reference sequence numbers in the same batch. This change #14150 alleviates the risk, by flushing batches earlier. However, as old loader do not receive the reference sequence numbers from the runtime, there is considerable risk of mixed batches in that case (new runtime + FlushModeExperimental.Async - old loader). Therefore, we need to explicitly block this combination.Loaders from versions older than the present will not work with
FlushModeExperimental.Asyncas they don't specify it's supported features in the ContainerContext implementation at all.