-
Notifications
You must be signed in to change notification settings - Fork 577
feat(container-runtime): bunch reSubmit dispatch across same-DDS runs #27429
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| "@fluidframework/runtime-definitions": minor | ||
| "@fluidframework/datastore-definitions": minor | ||
| "@fluidframework/container-runtime": minor | ||
| "@fluidframework/datastore": minor | ||
| "__section": feature | ||
| --- | ||
| Extend bunched dispatch from `processMessages` to `reSubmit` | ||
|
|
||
| The container runtime now bunches contiguous same-DDS resubmit entries when replaying a pending batch, mirroring the existing bunched dispatch for inbound `processMessages`. A batch of N consecutive ops targeting the same channel now makes one round trip through `ChannelCollection → FluidDataStoreContext → FluidDataStoreRuntime → IChannelContext → IDeltaHandler` rather than N. | ||
|
Check warning on line 10 in .changeset/bunched-resubmit-dispatch.md
|
||
|
|
||
| New API surface on `@legacy @beta`: | ||
|
|
||
| - `IRuntimeResubmitMessage` and `IRuntimeResubmitMessageCollection` (`@fluidframework/runtime-definitions`) — the bunched envelope, with a shared `squash` flag. | ||
|
Check failure on line 14 in .changeset/bunched-resubmit-dispatch.md
|
||
| - Optional `IFluidDataStoreChannel.reSubmitMessages(type, collection)` (`@fluidframework/runtime-definitions`) — opt-in bunched form alongside the existing `reSubmit`. | ||
|
Check failure on line 15 in .changeset/bunched-resubmit-dispatch.md
|
||
| - Optional `IDeltaHandler.reSubmitMessages(collection)` (`@fluidframework/datastore-definitions`) — opt-in bunched form alongside the existing `reSubmit`. | ||
|
Check failure on line 16 in .changeset/bunched-resubmit-dispatch.md
|
||
|
|
||
| DDSes that do not implement `reSubmitMessages` automatically fall back to per-message `reSubmit` calls. `SharedObject`-derived DDSes get a default implementation that loops on the existing `reSubmitCore` / `reSubmitSquashedCore` paths; they may override to take advantage of seeing the full run together. Non-`FluidDataStoreOp` runtime message types (Attach, Alias, GC, etc.) continue to use the existing single-op `reSubmit` path. | ||
|
Check warning on line 18 in .changeset/bunched-resubmit-dispatch.md
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we use the bunching helper here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deep Review: Good question —
forEachContiguousBunchwould parallel thechannelCollection.ts:847-873usage and complete the inbound/outbound symmetry the rest of the design rests on. Recommend landing the conversion here rather than as a follow-up, sincereSubmitBatch's ad-hoc accumulation is the one place in the outbound path that doesn't yet route through the shared helper.