Skip to content

Conversation

@anthony-murphy
Copy link
Contributor

@anthony-murphy anthony-murphy commented Mar 21, 2025

This change integrates staging mode into OrderSequentially which adds support of attaches, and naively implements keeping the dirty state consistent within staging mode it self.

AB#34238

configurations: { "Fluid.ContainerRuntime.EnableRollback": true },
skip: [
...[0, 2, 7, 10, 13, 15, 26, 29, 39, 52, 61, 66, 67, 75, 76, 82, 84, 88, 90], // RollbackError: Unsupported op type for rollback (shared intervals)
...[1, 3, 6, 8, 14, 23, 30, 53, 55, 56, 58, 59, 64, 70, 77, 80, 86, 93, 99], // RollbackError: Can't rollback attach message
Copy link
Contributor Author

@anthony-murphy anthony-murphy Mar 21, 2025

Choose a reason for hiding this comment

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

RollbackError: Can't rollback attach message is gone, some shifted to other buckets

this.rollback(content, localOpMetadata),
);
if (this.attachState === AttachState.Attached) {
this.updateDocumentDirtyState(this.pendingMessagesCount !== 0);
Copy link
Member

@markfields markfields Mar 21, 2025

Choose a reason for hiding this comment

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

Yeah looking at callers to this, I think we could be more rigid and just tie it to PSM state. (not for this PR)

if (this.dirtyContainer !== checkpointDirtyState) {
this.updateDocumentDirtyState(checkpointDirtyState);
}
stageControls?.discardChanges();
Copy link
Member

Choose a reason for hiding this comment

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

This will call outbox.flush, but without the if check that is below around the this.flush call. (PS if we called this.flush here it would assert since the counter isn't back to 0 yet).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it will only happen if the counter is zero as we only set the stage controls var when the counter is zero. all recursive calls will have undefined.

* Licensed under the MIT License.
*/

export class RunCounter {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@markfields thinking i'll bring this to main. i like it better for orderSequentially and re-entrancy, as it reduces mutable state in the container runtime, and i think makes all the code easier to follow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@anthony-murphy anthony-murphy merged commit 7c35613 into microsoft:test/staging-mode Mar 24, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants