-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressing a few issues regarding the OP reentry scenarios (#16176)
## Description Related to ADO:4537. [Grouped batching](https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#grouped-batching) is problematic in the context of op reentry, as all ops within the same batch have the same sequence number. A reentrant op (created during the execution of a 'changed' event callback of a DDS) will have a different baseline than the rest of the batch and with the erasure of sequence numbers, it is impossible for the DDSes to properly apply the op. This PR addresses this issue by detecting batches with reentrant ops and rebasing them. Rebasing a batch means resubmitting it to the runtime to have all its ops in agreement re reference sequence numbers and sequence numbers. The issue is showcased in the `Eventual consistency with op reentry` end to end test, which is currently disabled until the DDS supports rebasing, which will happen very soon. The test proves that enabling group batching risks creating inconsistent data models in the op reentry scenario. In a nutshell, this change will force the offending client to reorder its batch before it is sent, ensuring that all clients have the same view of the data model. ### Changes included in this PR: - allow for rebasing ops, opt-in (disabled by default) via runtime options with a feature gate override for shutting it down. - increase the captured stack length whenever we detect op reentry. This will be useful to identify problematic customer scenarios to leave our options open to possibly disable op reentry altogether in the future. - flushing is blocked inside DDS event handlers. This is to simplify the possible states in which the runtime can end up and also ensure that a client cannot spam the backend with ops in case of unbounded recursion.
- Loading branch information
Showing
12 changed files
with
551 additions
and
93 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.