-
Notifications
You must be signed in to change notification settings - Fork 557
DataStoreRuntime: Expose activeLocalOperationActivity #25772
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?
DataStoreRuntime: Expose activeLocalOperationActivity #25772
Conversation
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.
Pull Request Overview
This PR introduces a new activeLocalOperationActivity property to IFluidDataStoreRuntime that indicates when the runtime is performing specific local operation activities ("applyStashed", "rollback", or undefined). This allows consumers to determine when state changes are initiated by the runtime itself rather than by user code.
Key Changes:
- Added
activeLocalOperationActivityproperty to theIFluidDataStoreRuntimeinterface - Implemented the property with internal state tracking in
FluidDataStoreRuntimeusinglocalOpActivityfield - Added runtime state guards in
rollback()andapplyStashedOp()methods to ensure single-threaded behavior - Updated type validation configuration to acknowledge the breaking API change
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime/datastore-definitions/src/dataStoreRuntime.ts | Adds activeLocalOperationActivity property to IFluidDataStoreRuntime interface with documentation |
| packages/runtime/datastore/src/dataStoreRuntime.ts | Implements the property with state tracking and guards in rollback/applyStashedOp methods |
| packages/runtime/datastore/api-report/datastore.legacy.beta.api.md | API report update for the new public property |
| packages/runtime/datastore-definitions/api-report/datastore-definitions.legacy.beta.api.md | API report update for the new interface property |
| packages/runtime/datastore-definitions/api-report/datastore-definitions.legacy.alpha.api.md | API report update for the alpha API |
| packages/runtime/datastore/package.json | Marks FluidDataStoreRuntime as breaking forward compatibility |
| packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts | Adds ts-expect-error for expected compatibility break |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…hony-murphy/FluidFramework-1 into activeLocalOperationActivity
…to activeLocalOperationActivity
…to activeLocalOperationActivity
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See linkcheck output |
This pull request introduces a new property to the
IFluidDataStoreRuntimeinterface and theFluidDataStoreRuntimeclass, allowing consumers to detect when the runtime is performing local operation activities, such as applying stashed operations or rolling back uncommitted changes. The implementation ensures this property accurately reflects the runtime's state during these activities and resets it afterward. Additionally, the API reports and type validation are updated to reflect this change.API and Interface Enhancements:
activeLocalOperationActivityproperty to theIFluidDataStoreRuntimeinterface, with documentation explaining its possible values ("applyStashed","rollback", orundefined). This property allows consumers to distinguish between runtime-initiated and user-initiated state changes.activeLocalOperationActivitygetter to theFluidDataStoreRuntimeclassfixes AB#50978