Skip to content

Conversation

@scottn12
Copy link
Contributor

@scottn12 scottn12 commented Oct 24, 2025

Description

This PR enables rollback for the ConsensusOrderedCollection DDS.

Since it's a consensus-based DDS, we don't actually modify any data until an op is ack'd. The only requirement for rollback is to resolve open promises for local ops that are usually resolved in processCore(). The promises are already setup to "do nothing" when resolved with undefined, so we simply call the resolve function in the localOpMetadata with undefined.

Misc

AB#47480

@github-actions github-actions bot added area: dds Issues related to distributed data structures public api change Changes to a public API base: main PRs targeted against main branch labels Oct 24, 2025
@github-actions
Copy link
Contributor

🔗 Found some broken links! 💔

Run a link check locally to find them. See
https://github.com/microsoft/FluidFramework/wiki/Checking-for-broken-links-in-the-documentation for more information.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

 ELIFECYCLE  Command failed with exit code 1.

@scottn12 scottn12 marked this pull request as ready for review October 27, 2025 18:27
@scottn12 scottn12 requested a review from a team as a code owner October 27, 2025 18:27
Copilot AI review requested due to automatic review settings October 27, 2025 18:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables rollback functionality for the ConsensusOrderedCollection DDS by implementing the rollback method. Since this is a consensus-based DDS that doesn't modify data until ops are acknowledged, rollback is implemented by resolving open promises for local operations with undefined, which causes them to gracefully handle the rolled-back state.

Key changes:

  • Implemented the rollback method in ConsensusOrderedCollection to resolve pending promises with undefined
  • Added comprehensive test coverage for various rollback scenarios
  • Extended test utilities with acquireAndRelease and waitAcquireAndRelease helper methods

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/dds/ordered-collection/src/consensusOrderedCollection.ts Implements the rollback method to resolve pending operation promises with undefined
packages/dds/ordered-collection/src/testUtils.ts Adds new helper methods for acquire-and-release test patterns
packages/dds/ordered-collection/src/index.ts Exports the new test utility functions
packages/dds/ordered-collection/src/test/consensusOrderedCollection.spec.ts Adds comprehensive rollback test suite covering various scenarios
packages/dds/ordered-collection/api-report/ordered-collection.legacy.beta.api.md Updates API surface to reflect the new protected rollback method

@scottn12 scottn12 merged commit 7b3c4a1 into microsoft:main Oct 29, 2025
45 checks passed
@scottn12 scottn12 deleted the ConsensusOrderedCollection-Rollback branch October 29, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds Issues related to distributed data structures base: main PRs targeted against main branch public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants