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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write new pending message format in PendingStateManager #16136

Merged
merged 3 commits into from
Jul 18, 2023

Conversation

kian-thompson
Copy link
Contributor

@kian-thompson kian-thompson commented Jun 23, 2023

In PendingStateManager.getLocalState(), write the new message format instead of the old format
See changes in #14462

AB#3826

Follow-up item for 2.0.0-internal.7.0.0: AB#4763

@kian-thompson kian-thompson requested a review from a team as a code owner June 23, 2023 23:27
@github-actions github-actions bot added area: runtime Runtime related issues base: next PRs targeted against next branch labels Jun 23, 2023
// IdAllocations need their localOpMetadata stashed in the contents
// of the op to correctly resume the session when processing stashed ops
if (content.type === ContainerMessageType.IdAllocation) {
content.contents.stashedState = message.localOpMetadata;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justus-camp Is it possible to have this stashedState be part of the content when submitting the message (i.e. in maybeSubmitIdAllocationOp)?
I want to avoid parse then serialize as much as possible just to check the type add another prop to the content string

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used localOpMetadata because we don't want to submit the stashedState over the wire but need it to rehydrate the IdCompressor for stashed ops. My initial prototype actually did what you're suggesting and deleted stashedState from the op before submission, but there's a check in PendingStateManager::processPendingLocalMessage that makes doing it this way difficult and causes a DataProcessingError. I suppose we could ignore IdAllocation ops in that check but that's pretty unfortunate.

It's worth noting that overall this stashed op implementation isn't great and we kind of "retro-fitted" the original compressor to do it this way.

Copy link
Contributor Author

@kian-thompson kian-thompson Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to move the serialized state to a summary blob? I think it should, but I may be missing something. Regardless, I'll re-add the logic in the PendingStateManager for back/forward compat, but ideally the PSM wouldn't know about specific op types (can be fixed later on).

@msfluid-bot
Copy link
Collaborator

Could not find a usable baseline build with search starting at CI 1fb4cb9

Generated by 🚫 dangerJS against d7b1dd0

Copy link
Contributor

@NicholasCouri NicholasCouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@github-actions
Copy link
Contributor

Please review this PR: @sonalideshpandemsft @tylerbutler @scottn12

@sonalideshpandemsft
Copy link
Contributor

I'll merge this PR after main/next integrate PR is merged: #16428

@sonalideshpandemsft sonalideshpandemsft merged commit 691bdea into microsoft:next Jul 18, 2023
30 checks passed
@kian-thompson kian-thompson deleted the 3826-psm-new-format branch August 18, 2023 20:21
sonalideshpandemsft pushed a commit that referenced this pull request Aug 29, 2023
## Description

The `PendingStateManager` will now only read the new pending message
format.

This is the final stage in the multi-step process of changing the format
of pending local messages read and written by the `PendingStateManager`.

See #16136


[AB#4763](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/4763)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtime Runtime related issues base: next PRs targeted against next branch msftbot: merge-next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants