@fluidframework/container-runtime 2.0.0-internal.2.4.0 → 2.0.0-internal.3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/containerRuntime.d.ts +45 -42
  2. package/dist/containerRuntime.d.ts.map +1 -1
  3. package/dist/containerRuntime.js +87 -38
  4. package/dist/containerRuntime.js.map +1 -1
  5. package/dist/dataStoreContext.d.ts +1 -0
  6. package/dist/dataStoreContext.d.ts.map +1 -1
  7. package/dist/dataStoreContext.js +7 -2
  8. package/dist/dataStoreContext.js.map +1 -1
  9. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  10. package/dist/opLifecycle/outbox.js +0 -1
  11. package/dist/opLifecycle/outbox.js.map +1 -1
  12. package/dist/packageVersion.d.ts +1 -1
  13. package/dist/packageVersion.js +1 -1
  14. package/dist/packageVersion.js.map +1 -1
  15. package/dist/pendingStateManager.d.ts +4 -13
  16. package/dist/pendingStateManager.d.ts.map +1 -1
  17. package/dist/pendingStateManager.js +130 -160
  18. package/dist/pendingStateManager.js.map +1 -1
  19. package/dist/summarizerClientElection.d.ts +1 -2
  20. package/dist/summarizerClientElection.d.ts.map +1 -1
  21. package/dist/summarizerClientElection.js +3 -30
  22. package/dist/summarizerClientElection.js.map +1 -1
  23. package/dist/summarizerTypes.d.ts +0 -4
  24. package/dist/summarizerTypes.d.ts.map +1 -1
  25. package/dist/summarizerTypes.js.map +1 -1
  26. package/lib/containerRuntime.d.ts +45 -42
  27. package/lib/containerRuntime.d.ts.map +1 -1
  28. package/lib/containerRuntime.js +87 -38
  29. package/lib/containerRuntime.js.map +1 -1
  30. package/lib/dataStoreContext.d.ts +1 -0
  31. package/lib/dataStoreContext.d.ts.map +1 -1
  32. package/lib/dataStoreContext.js +7 -2
  33. package/lib/dataStoreContext.js.map +1 -1
  34. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  35. package/lib/opLifecycle/outbox.js +0 -1
  36. package/lib/opLifecycle/outbox.js.map +1 -1
  37. package/lib/packageVersion.d.ts +1 -1
  38. package/lib/packageVersion.js +1 -1
  39. package/lib/packageVersion.js.map +1 -1
  40. package/lib/pendingStateManager.d.ts +4 -13
  41. package/lib/pendingStateManager.d.ts.map +1 -1
  42. package/lib/pendingStateManager.js +130 -160
  43. package/lib/pendingStateManager.js.map +1 -1
  44. package/lib/summarizerClientElection.d.ts +1 -2
  45. package/lib/summarizerClientElection.d.ts.map +1 -1
  46. package/lib/summarizerClientElection.js +3 -30
  47. package/lib/summarizerClientElection.js.map +1 -1
  48. package/lib/summarizerTypes.d.ts +0 -4
  49. package/lib/summarizerTypes.d.ts.map +1 -1
  50. package/lib/summarizerTypes.js.map +1 -1
  51. package/package.json +34 -16
  52. package/src/containerRuntime.ts +116 -84
  53. package/src/dataStoreContext.ts +12 -6
  54. package/src/opLifecycle/outbox.ts +0 -2
  55. package/src/packageVersion.ts +1 -1
  56. package/src/pendingStateManager.ts +146 -187
  57. package/src/summarizerClientElection.ts +1 -30
  58. package/src/summarizerTypes.ts +0 -4
@@ -59,6 +59,7 @@ export declare abstract class FluidDataStoreContext extends TypedEventEmitter<IF
59
59
  get connected(): boolean;
60
60
  get IFluidHandleContext(): import("@fluidframework/core-interfaces").IFluidHandleContext;
61
61
  get containerRuntime(): IContainerRuntime;
62
+ ensureNoDataModelChanges<T>(callback: () => T): T;
62
63
  get isLoaded(): boolean;
63
64
  get baseSnapshot(): ISnapshotTree | undefined;
64
65
  private _disposed;
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAwB,MAAM,oCAAoC,CAAC;AACzG,OAAO,EACH,WAAW,EACX,QAAQ,EACR,SAAS,EACT,YAAY,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,aAAa,EACb,WAA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,qBAAqB;IAClE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyC;gBAE5D,KAAK,EAAE,iCAAiC;IAqBpD,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CA0CrC;IAEU,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAItD,gBAAgB,IAAI,OAAO,CAAC,6BAA6B,CAAC;IAIhE,qBAAqB,IAAI,cAAc;CAGjD;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,qBAAqB;IACrE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;IACzD;;OAEG;IACH,SAAgB,WAAW,CAAC,EAAE,GAAG,CAAC;gBAEtB,KAAK,EAAE,gCAAgC;IAiBnD,OAAO,CAAC,eAAe;IAWhB,qBAAqB,IAAI,cAAc;IA4BjC,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAiCtD,gBAAgB,IAAI,OAAO,CAAC,6BAA6B,CAAC;CAI1E;AAED;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,8BAA8B;gBAC9D,KAAK,EAAE,gCAAgC;CAGtD;AAED;;;;;GAKG;AACH,qBAAa,kCACT,SAAQ,8BACR,YAAW,8BAA8B;gBAC7B,KAAK,EAAE,gCAAgC;IAKtC,aAAa,CACtB,QAAQ,EAAE,6BAA6B,EACvC,gBAAgB,EAAE,sBAAsB;IA+B/B,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAMtE"}
@@ -105,6 +105,9 @@ class FluidDataStoreContext extends common_utils_1.TypedEventEmitter {
105
105
  get containerRuntime() {
106
106
  return this._containerRuntime;
107
107
  }
108
+ ensureNoDataModelChanges(callback) {
109
+ return this._containerRuntime.ensureNoDataModelChanges(callback);
110
+ }
108
111
  get isLoaded() {
109
112
  return this.loaded;
110
113
  }
@@ -457,10 +460,12 @@ class FluidDataStoreContext extends common_utils_1.TypedEventEmitter {
457
460
  }
458
461
  catch (error) {
459
462
  (_a = this.channelDeferred) === null || _a === void 0 ? void 0 : _a.reject(error);
460
- this.logger.sendErrorEvent({ eventName: "BindRuntimeError", fluidDataStoreId: {
463
+ this.logger.sendErrorEvent({
464
+ eventName: "BindRuntimeError", fluidDataStoreId: {
461
465
  value: this.id,
462
466
  tag: telemetry_utils_1.TelemetryDataTag.CodeArtifact,
463
- } }, error);
467
+ },
468
+ }, error);
464
469
  }
465
470
  }
466
471
  async getAbsoluteUrl(relativeUrl) {
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,iFAK+C;AAC/C,+DAKsC;AAEtC,+DAA4D;AAC5D,iEAA8D;AAY9D,6EAqB6C;AAC7C,iEAGuC;AACvC,qEAOyC;AACzC,qEAIyC;AAGzC,mDAQyB;AACzB,6EAAwE;AACxE,uFAAyE;AACzE,yEAAkE;AAElE,SAAS,gBAAgB,CACrB,GAAsB,EACtB,eAAwB;IAExB,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3C,OAAO;QACH,GAAG,EAAE,cAAc;QACnB,oBAAoB,EAAE,CAAC;QACvB,eAAe;KAClB,CAAC;AACN,CAAC;AACD,SAAgB,oBAAoB,CAChC,GAAsB,EACtB,eAAwB;IAExB,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IAC1D,OAAO,IAAI,6BAAa,CAAC,2CAA2B,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AACtF,CAAC;AAND,oDAMC;AAyCD;;GAEG;AACH,MAAsB,qBAAsB,SAAQ,gCAA+C;IAoH/F,YACI,KAAkC,EACjB,QAAiB,EAC1B,SAAoB,EAAG,6CAA6C;IAC5D,gBAAyB,EACxB,oBAAgC;QAEjD,KAAK,EAAE,CAAC;QALS,aAAQ,GA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AC;IAC7C,CAAC;CACJ;AA/CD,gFA+CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, ITelemetryLogger, ITelemetryProperties } from \"@fluidframework/common-definitions\";\nimport {\n FluidObject,\n IRequest,\n IResponse,\n IFluidHandle,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n assert,\n Deferred,\n LazyPromise,\n TypedEventEmitter,\n} from \"@fluidframework/common-utils\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport { BlobTreeEntry } from \"@fluidframework/protocol-base\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITreeEntry,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IContainerRuntime,\n} from \"@fluidframework/container-runtime-definitions\";\nimport {\n BindState,\n channelsTreeName,\n CreateChildSummarizerNodeFn,\n CreateChildSummarizerNodeParam,\n FluidDataStoreRegistryEntry,\n IAttachMessage,\n IFluidDataStoreChannel,\n IFluidDataStoreContext,\n IFluidDataStoreContextDetached,\n IFluidDataStoreContextEvents,\n IFluidDataStoreRegistry,\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IInboundSignalMessage,\n IProvideFluidDataStoreFactory,\n ISummarizeInternalResult,\n ISummarizeResult,\n ISummarizerNodeWithGC,\n SummarizeInternalFn,\n ITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n addBlobToSummary,\n convertSummaryTreeToITree,\n} from \"@fluidframework/runtime-utils\";\nimport {\n ChildLogger,\n loggerToMonitoringContext,\n LoggingError,\n MonitoringContext,\n TelemetryDataTag,\n ThresholdCounter,\n} from \"@fluidframework/telemetry-utils\";\nimport {\n DataCorruptionError,\n DataProcessingError,\n extractSafePropertiesFromMessage,\n} from \"@fluidframework/container-utils\";\n\nimport { ContainerRuntime } from \"./containerRuntime\";\nimport {\n dataStoreAttributesBlobName,\n hasIsolatedChannels,\n wrapSummaryInChannelsTree,\n ReadFluidDataStoreAttributes,\n WriteFluidDataStoreAttributes,\n getAttributesFormatVersion,\n getFluidDataStoreAttributes,\n} from \"./summaryFormat\";\nimport { throwOnTombstoneUsageKey } from \"./garbageCollectionConstants\";\nimport { sendGCTombstoneEvent } from \"./garbageCollectionTombstoneUtils\";\nimport { summarizerClientType } from \"./summarizerClientElection\";\n\nfunction createAttributes(\n pkg: readonly string[],\n isRootDataStore: boolean,\n): WriteFluidDataStoreAttributes {\n const stringifiedPkg = JSON.stringify(pkg);\n return {\n pkg: stringifiedPkg,\n summaryFormatVersion: 2,\n isRootDataStore,\n };\n}\nexport function createAttributesBlob(\n pkg: readonly string[],\n isRootDataStore: boolean,\n): ITreeEntry {\n const attributes = createAttributes(pkg, isRootDataStore);\n return new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));\n}\n\ninterface ISnapshotDetails {\n pkg: readonly string[];\n isRootDataStore: boolean;\n snapshot?: ISnapshotTree;\n}\n\ninterface FluidDataStoreMessage {\n content: any;\n type: string;\n}\n\n/** Properties necessary for creating a FluidDataStoreContext */\nexport interface IFluidDataStoreContextProps {\n readonly id: string;\n readonly runtime: ContainerRuntime;\n readonly storage: IDocumentStorageService;\n readonly scope: FluidObject;\n readonly createSummarizerNodeFn: CreateChildSummarizerNodeFn;\n readonly pkg?: Readonly<string[]>;\n}\n\n/** Properties necessary for creating a local FluidDataStoreContext */\nexport interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContextProps {\n readonly pkg: Readonly<string[]> | undefined;\n readonly snapshotTree: ISnapshotTree | undefined;\n readonly isRootDataStore: boolean | undefined;\n readonly makeLocallyVisibleFn: () => void;\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n}\n\n/** Properties necessary for creating a remote FluidDataStoreContext */\nexport interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContextProps {\n readonly snapshotTree: ISnapshotTree | undefined;\n readonly getBaseGCDetails: () => Promise<IGarbageCollectionDetailsBase | undefined>;\n}\n\n/**\n * Represents the context for the store. This context is passed to the store runtime.\n */\nexport abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidDataStoreContextEvents> implements\n IFluidDataStoreContext,\n IDisposable {\n public get packagePath(): readonly string[] {\n assert(this.pkg !== undefined, 0x139 /* \"Undefined package path\" */);\n return this.pkg;\n }\n\n public get options(): ILoaderOptions {\n return this._containerRuntime.options;\n }\n\n public get clientId(): string | undefined {\n return this._containerRuntime.clientId;\n }\n\n public get clientDetails(): IClientDetails {\n return this._containerRuntime.clientDetails;\n }\n\n public get logger(): ITelemetryLogger {\n return this._containerRuntime.logger;\n }\n\n public get deltaManager(): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {\n return this._containerRuntime.deltaManager;\n }\n\n public get connected(): boolean {\n return this._containerRuntime.connected;\n }\n\n public get IFluidHandleContext() {\n return this._containerRuntime.IFluidHandleContext;\n }\n\n public get containerRuntime(): IContainerRuntime {\n return this._containerRuntime;\n }\n\n public get isLoaded(): boolean {\n return this.loaded;\n }\n\n public get baseSnapshot(): ISnapshotTree | undefined {\n return this._baseSnapshot;\n }\n\n private _disposed = false;\n public get disposed() { return this._disposed; }\n\n /**\n * Tombstone is a temporary feature that prevents a data store from sending / receiving ops, signals and from\n * loading.\n */\n private _tombstoned = false;\n public get tombstoned() { return this._tombstoned; }\n /** If true, throw an error when a tombstone data store is used. */\n private readonly throwOnTombstoneUsage: boolean;\n\n public get attachState(): AttachState {\n return this._attachState;\n }\n\n public get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined {\n return this.registry;\n }\n\n /**\n * A datastore is considered as root if it\n * 1. is root in memory - see isInMemoryRoot\n * 2. is root as part of the base snapshot that the datastore loaded from\n * @returns whether a datastore is root\n */\n public async isRoot(): Promise<boolean> {\n return this.isInMemoryRoot() || (await this.getInitialSnapshotDetails()).isRootDataStore;\n }\n\n /**\n * There are 3 states where isInMemoryRoot needs to be true\n * 1. when a datastore becomes aliased. This can happen for both remote and local datastores\n * 2. when a datastore is created locally as root\n * 3. when a datastore is created locally as root and is rehydrated\n * @returns whether a datastore is root in memory\n */\n protected isInMemoryRoot(): boolean {\n return this._isInMemoryRoot;\n }\n\n protected registry: IFluidDataStoreRegistry | undefined;\n\n protected detachedRuntimeCreation = false;\n /** @deprecated - To be replaced by calling makeLocallyVisible directly */\n public readonly bindToContext: () => void;\n protected channel: IFluidDataStoreChannel | undefined;\n private loaded = false;\n protected pending: ISequencedDocumentMessage[] | undefined = [];\n protected channelDeferred: Deferred<IFluidDataStoreChannel> | undefined;\n private _baseSnapshot: ISnapshotTree | undefined;\n protected _attachState: AttachState;\n private _isInMemoryRoot: boolean = false;\n protected readonly summarizerNode: ISummarizerNodeWithGC;\n private readonly mc: MonitoringContext;\n private readonly thresholdOpsCounter: ThresholdCounter;\n private static readonly pendingOpsCountThreshold = 1000;\n\n // The used routes of this node as per the last GC run. This is used to update the used routes of the channel\n // if it realizes after GC is run.\n private lastUsedRoutes: string[] | undefined;\n\n public readonly id: string;\n private readonly _containerRuntime: ContainerRuntime;\n public readonly storage: IDocumentStorageService;\n public readonly scope: FluidObject;\n protected pkg?: readonly string[];\n\n constructor(\n props: IFluidDataStoreContextProps,\n private readonly existing: boolean,\n private bindState: BindState, // Used to assert for state tracking purposes\n public readonly isLocalDataStore: boolean,\n private readonly makeLocallyVisibleFn: () => void,\n ) {\n super();\n\n this._containerRuntime = props.runtime;\n this.id = props.id;\n this.storage = props.storage;\n this.scope = props.scope;\n this.pkg = props.pkg;\n\n // URIs use slashes as delimiters. Handles use URIs.\n // Thus having slashes in types almost guarantees trouble down the road!\n assert(!this.id.includes(\"/\"), 0x13a /* Data store ID contains slash */);\n\n this._attachState = this.containerRuntime.attachState !== AttachState.Detached && this.existing ?\n this.containerRuntime.attachState : AttachState.Detached;\n\n this.bindToContext = () => {\n assert(this.bindState === BindState.NotBound, 0x13b /* \"datastore context is already in bound state\" */);\n this.bindState = BindState.Binding;\n assert(this.channel !== undefined, 0x13c /* \"undefined channel on datastore context\" */);\n this.makeLocallyVisible();\n this.bindState = BindState.Bound;\n };\n\n const thisSummarizeInternal =\n async (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext) =>\n this.summarizeInternal(fullTree, trackState, telemetryContext);\n\n this.summarizerNode = props.createSummarizerNodeFn(\n thisSummarizeInternal,\n async (fullGC?: boolean) => this.getGCDataInternal(fullGC),\n async () => this.getBaseGCDetails(),\n );\n\n this.mc = loggerToMonitoringContext(ChildLogger.create(this.logger, \"FluidDataStoreContext\"));\n this.thresholdOpsCounter = new ThresholdCounter(FluidDataStoreContext.pendingOpsCountThreshold, this.mc.logger);\n\n // Tombstone should only throw when the feature flag is enabled and the client isn't a summarizer\n this.throwOnTombstoneUsage =\n this.mc.config.getBoolean(throwOnTombstoneUsageKey) === true &&\n this.clientDetails.type !== summarizerClientType;\n }\n\n public dispose(): void {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n\n // Dispose any pending runtime after it gets fulfilled\n // Errors are logged where this.channelDeferred is consumed/generated (realizeCore(), bindRuntime())\n if (this.channelDeferred) {\n this.channelDeferred.promise.then((runtime) => {\n runtime.dispose();\n }).catch((error) => {});\n }\n }\n\n public setTombstone(tombstone: boolean) {\n if (this.tombstoned === tombstone) {\n return;\n }\n\n this._tombstoned = tombstone;\n }\n\n private rejectDeferredRealize(reason: string, packageName?: string): never {\n throw new LoggingError(reason, { packageName: { value: packageName, tag: TelemetryDataTag.CodeArtifact } });\n }\n\n public async realize(): Promise<IFluidDataStoreChannel> {\n assert(!this.detachedRuntimeCreation, 0x13d /* \"Detached runtime creation on realize()\" */);\n if (!this.channelDeferred) {\n this.channelDeferred = new Deferred<IFluidDataStoreChannel>();\n this.realizeCore(this.existing).catch((error) => {\n const errorWrapped = DataProcessingError.wrapIfUnrecognized(error, \"realizeFluidDataStoreContext\");\n errorWrapped.addTelemetryProperties({\n fluidDataStoreId: {\n value: this.id,\n tag: TelemetryDataTag.CodeArtifact,\n },\n });\n this.channelDeferred?.reject(errorWrapped);\n this.logger.sendErrorEvent({ eventName: \"RealizeError\" }, errorWrapped);\n });\n }\n return this.channelDeferred.promise;\n }\n\n protected async factoryFromPackagePath(packages?: readonly string[]) {\n assert(this.pkg === packages, 0x13e /* \"Unexpected package path\" */);\n if (packages === undefined) {\n this.rejectDeferredRealize(\"packages is undefined\");\n }\n\n let entry: FluidDataStoreRegistryEntry | undefined;\n let registry: IFluidDataStoreRegistry | undefined = this._containerRuntime.IFluidDataStoreRegistry;\n let lastPkg: string | undefined;\n for (const pkg of packages) {\n if (!registry) {\n this.rejectDeferredRealize(\"No registry for package\", lastPkg);\n }\n lastPkg = pkg;\n entry = await registry.get(pkg);\n if (!entry) {\n this.rejectDeferredRealize(\"Registry does not contain entry for the package\", pkg);\n }\n registry = entry.IFluidDataStoreRegistry;\n }\n const factory = entry?.IFluidDataStoreFactory;\n if (factory === undefined) {\n this.rejectDeferredRealize(\"Can't find factory for package\", lastPkg);\n }\n\n return { factory, registry };\n }\n\n private async realizeCore(existing: boolean): Promise<void> {\n const details = await this.getInitialSnapshotDetails();\n // Base snapshot is the baseline where pending ops are applied to.\n // It is important that this be in sync with the pending ops, and also\n // that it is set here, before bindRuntime is called.\n this._baseSnapshot = details.snapshot;\n const packages = details.pkg;\n\n const { factory, registry } = await this.factoryFromPackagePath(packages);\n\n assert(this.registry === undefined, 0x13f /* \"datastore context registry is already set\" */);\n this.registry = registry;\n\n const channel = await factory.instantiateDataStore(this, existing);\n assert(channel !== undefined, 0x140 /* \"undefined channel on datastore context\" */);\n this.bindRuntime(channel);\n }\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. Its old ID when in disconnected state and\n * its new client ID when we are connecting or connected.\n */\n public setConnectionState(connected: boolean, clientId?: string) {\n // ConnectionState should not fail in tombstone mode as this is internally run\n this.verifyNotClosed(\"setConnectionState\", false /* checkTombstone */);\n\n // Connection events are ignored if the store is not yet loaded\n if (!this.loaded) {\n return;\n }\n\n assert(this.connected === connected, 0x141 /* \"Unexpected connected state\" */);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.channel!.setConnectionState(connected, clientId);\n }\n\n public process(messageArg: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {\n this.verifyNotClosed(\"process\", true, extractSafePropertiesFromMessage(messageArg));\n\n const innerContents = messageArg.contents as FluidDataStoreMessage;\n const message = {\n ...messageArg,\n type: innerContents.type,\n contents: innerContents.content,\n };\n\n this.summarizerNode.recordChange(message);\n\n if (this.loaded) {\n return this.channel?.process(message, local, localOpMetadata);\n } else {\n assert(!local, 0x142 /* \"local store channel is not loaded\" */);\n assert(this.pending !== undefined, 0x23d /* \"pending is undefined\" */);\n this.pending.push(message);\n this.thresholdOpsCounter.sendIfMultiple(\"StorePendingOps\", this.pending.length);\n }\n }\n\n public processSignal(message: IInboundSignalMessage, local: boolean): void {\n this.verifyNotClosed(\"processSignal\");\n\n // Signals are ignored if the store is not yet loaded\n if (!this.loaded) {\n return;\n }\n\n this.channel?.processSignal(message, local);\n }\n\n public getQuorum(): IQuorumClients {\n return this._containerRuntime.getQuorum();\n }\n\n public getAudience(): IAudience {\n return this._containerRuntime.getAudience();\n }\n\n /**\n * Returns a summary at the current sequence number.\n * @param fullTree - true to bypass optimizations and force a full summary tree\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n public async summarize(\n fullTree: boolean = false,\n trackState: boolean = true,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult> {\n return this.summarizerNode.summarize(fullTree, trackState, telemetryContext);\n }\n\n private async summarizeInternal(\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeInternalResult> {\n await this.realize();\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const summarizeResult = await this.channel!.summarize(fullTree, trackState, telemetryContext);\n\n // Wrap dds summaries in .channels subtree.\n wrapSummaryInChannelsTree(summarizeResult);\n const pathPartsForChildren = [channelsTreeName];\n\n // Add data store's attributes to the summary.\n const { pkg } = await this.getInitialSnapshotDetails();\n const isRoot = await this.isRoot();\n const attributes = createAttributes(pkg, isRoot);\n addBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));\n\n // If we are not referenced, mark the summary tree as unreferenced. Also, update unreferenced blob\n // size in the summary stats with the blobs size of this data store.\n if (!this.summarizerNode.isReferenced()) {\n summarizeResult.summary.unreferenced = true;\n summarizeResult.stats.unreferencedBlobSize = summarizeResult.stats.totalBlobSize;\n }\n\n return {\n ...summarizeResult,\n id: this.id,\n pathPartsForChildren,\n };\n }\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this data store\n * including any of its child channel contexts. Each node has a set of outbound routes to other GC nodes in the\n * document.\n * If there is no new data in this data store since the last summary, previous GC data is used.\n * If there is new data, the GC data is generated again (by calling getGCDataInternal).\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n public async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n return this.summarizerNode.getGCData(fullGC);\n }\n\n /**\n * Generates data used for garbage collection. This is called when there is new data since last summary. It\n * realizes the data store and calls into each channel context to get its GC data.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n private async getGCDataInternal(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n await this.realize();\n assert(this.channel !== undefined, 0x143 /* \"Channel should not be undefined when running GC\" */);\n\n return this.channel.getGCData(fullGC);\n }\n\n /**\n * After GC has run, called to notify the data store of routes used in it. These are used for the following:\n *\n * 1. To identify if this data store is being referenced in the document or not.\n *\n * 2. To determine if it needs to re-summarize in case used routes changed since last summary.\n *\n * 3. These are added to the summary generated by the data store.\n *\n * 4. To notify child contexts of their used routes. This is done immediately if the data store is loaded.\n * Else, it is done when realizing the data store.\n *\n * 5. To update the timestamp when this data store or any children are marked as unreferenced.\n *\n * @param usedRoutes - The routes that are used in this data store.\n */\n public updateUsedRoutes(usedRoutes: string[]) {\n // Update the used routes in this data store's summarizer node.\n this.summarizerNode.updateUsedRoutes(usedRoutes);\n\n /**\n * Store the used routes to update the channel if the data store is not loaded yet. If the used routes changed\n * since the previous run, the data store will be loaded during summarize since the used state changed. So, it's\n * safe to only store the last used routes.\n */\n this.lastUsedRoutes = usedRoutes;\n\n // If we are loaded, call the channel so it can update the used routes of the child contexts.\n // If we are not loaded, we will update this when we are realized.\n if (this.loaded) {\n this.updateChannelUsedRoutes();\n }\n }\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n public addedGCOutboundReference(srcHandle: IFluidHandle, outboundHandle: IFluidHandle) {\n this._containerRuntime.addedGCOutboundReference(srcHandle, outboundHandle);\n }\n\n /**\n * Updates the used routes of the channel and its child contexts. The channel must be loaded before calling this.\n * It is called in these two scenarios:\n * 1. When the used routes of the data store is updated and the data store is loaded.\n * 2. When the data store is realized. This updates the channel's used routes as per last GC run.\n */\n private updateChannelUsedRoutes() {\n assert(this.loaded, 0x144 /* \"Channel should be loaded when updating used routes\" */);\n assert(this.channel !== undefined, 0x145 /* \"Channel should be present when data store is loaded\" */);\n\n // If there is no lastUsedRoutes, GC has not run up until this point.\n if (this.lastUsedRoutes === undefined) {\n return;\n }\n\n // Remove the route to this data store, if it exists.\n const usedChannelRoutes = this.lastUsedRoutes.filter(\n (id: string) => { return id !== \"/\" && id !== \"\"; },\n );\n this.channel.updateUsedRoutes(usedChannelRoutes);\n }\n\n /**\n * @deprecated 0.18.Should call request on the runtime directly\n */\n public async request(request: IRequest): Promise<IResponse> {\n const runtime = await this.realize();\n return runtime.request(request);\n }\n\n public submitMessage(type: string, content: any, localOpMetadata: unknown): void {\n this.verifyNotClosed(\"submitMessage\");\n assert(!!this.channel, 0x146 /* \"Channel must exist when submitting message\" */);\n const fluidDataStoreContent: FluidDataStoreMessage = {\n content,\n type,\n };\n this._containerRuntime.submitDataStoreOp(\n this.id,\n fluidDataStoreContent,\n localOpMetadata);\n }\n\n /**\n * This is called from a SharedSummaryBlock that does not generate ops but only wants to be part of the summary.\n * It indicates that there is data in the object that needs to be summarized.\n * We will update the latestSequenceNumber of the summary tracker of this\n * store and of the object's channel.\n *\n * @param address - The address of the channel that is dirty.\n *\n */\n public setChannelDirty(address: string): void {\n this.verifyNotClosed(\"setChannelDirty\");\n\n // Get the latest sequence number.\n const latestSequenceNumber = this.deltaManager.lastSequenceNumber;\n\n this.summarizerNode.invalidate(latestSequenceNumber);\n\n const channelSummarizerNode = this.summarizerNode.getChild(address);\n\n if (channelSummarizerNode) {\n channelSummarizerNode.invalidate(latestSequenceNumber); // TODO: lazy load problem?\n }\n }\n\n public submitSignal(type: string, content: any) {\n this.verifyNotClosed(\"submitSignal\");\n\n assert(!!this.channel, 0x147 /* \"Channel must exist on submitting signal\" */);\n return this._containerRuntime.submitDataStoreSignal(this.id, type, content);\n }\n\n /**\n * This is called by the data store channel when it becomes locally visible indicating that it is ready to become\n * globally visible now.\n */\n public makeLocallyVisible() {\n assert(this.channel !== undefined, 0x2cf /* \"undefined channel on datastore context\" */);\n this.makeLocallyVisibleFn();\n }\n\n protected bindRuntime(channel: IFluidDataStoreChannel) {\n if (this.channel) {\n throw new Error(\"Runtime already bound\");\n }\n\n try {\n assert(!this.detachedRuntimeCreation, 0x148 /* \"Detached runtime creation on runtime bind\" */);\n assert(this.channelDeferred !== undefined, 0x149 /* \"Undefined channel deferral\" */);\n assert(this.pkg !== undefined, 0x14a /* \"Undefined package path\" */);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const pending = this.pending!;\n\n // Apply all pending ops\n for (const op of pending) {\n channel.process(op, false, undefined /* localOpMetadata */);\n }\n\n this.thresholdOpsCounter.send(\"ProcessPendingOps\", pending.length);\n this.pending = undefined;\n\n // And now mark the runtime active\n this.loaded = true;\n this.channel = channel;\n\n // Freeze the package path to ensure that someone doesn't modify it when it is\n // returned in packagePath().\n Object.freeze(this.pkg);\n\n /**\n * Update the used routes of the channel. If GC has run before this data store was realized, we will have\n * the used routes saved. So, this will ensure that all the child contexts have up-to-date used routes as\n * per the last time GC was run.\n * Also, this data store may have been realized during summarize. In that case, the child contexts need to\n * have their used routes updated to determine if its needs to summarize again and to add it to the summary.\n */\n this.updateChannelUsedRoutes();\n\n // And notify the pending promise it is now available\n this.channelDeferred.resolve(this.channel);\n } catch (error) {\n this.channelDeferred?.reject(error);\n this.logger.sendErrorEvent(\n { eventName: \"BindRuntimeError\", fluidDataStoreId: {\n value: this.id,\n tag: TelemetryDataTag.CodeArtifact,\n } },\n error);\n }\n }\n\n public async getAbsoluteUrl(relativeUrl: string): Promise<string | undefined> {\n if (this.attachState !== AttachState.Attached) {\n return undefined;\n }\n return this._containerRuntime.getAbsoluteUrl(relativeUrl);\n }\n\n public abstract generateAttachMessage(): IAttachMessage;\n\n public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;\n\n /**\n * @deprecated Sets the datastore as root, for aliasing purposes: #7948\n * This method should not be used outside of the aliasing context.\n * It will be removed, as the source of truth for this flag will be the aliasing blob.\n */\n public setInMemoryRoot(): void {\n this._isInMemoryRoot = true;\n }\n\n public abstract getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n public reSubmit(contents: any, localOpMetadata: unknown) {\n assert(!!this.channel, 0x14b /* \"Channel must exist when resubmitting ops\" */);\n const innerContents = contents as FluidDataStoreMessage;\n this.channel.reSubmit(innerContents.type, innerContents.content, localOpMetadata);\n }\n\n public rollback(contents: any, localOpMetadata: unknown) {\n if (!this.channel) {\n throw new Error(\"Channel must exist when rolling back ops\");\n }\n if (!this.channel.rollback) {\n throw new Error(\"Channel doesn't support rollback\");\n }\n const innerContents = contents as FluidDataStoreMessage;\n this.channel.rollback(innerContents.type, innerContents.content, localOpMetadata);\n }\n\n public async applyStashedOp(contents: any): Promise<unknown> {\n if (!this.channel) {\n await this.realize();\n }\n assert(!!this.channel, 0x14c /* \"Channel must exist when rebasing ops\" */);\n const innerContents = contents as FluidDataStoreMessage;\n return this.channel.applyStashedOp(innerContents.content);\n }\n\n private verifyNotClosed(callSite: string, checkTombstone = true, safeTelemetryProps: ITelemetryProperties = {}) {\n if (this._disposed) {\n throw new Error(`Context is closed! Call site [${callSite}]`);\n }\n\n if (checkTombstone && this.tombstoned) {\n const messageString = `Context is tombstoned! Call site [${callSite}]`;\n const error = new DataCorruptionError(messageString, safeTelemetryProps);\n\n sendGCTombstoneEvent(\n this.mc,\n {\n eventName: \"GC_Tombstone_DataStore_Changed\",\n category: this.throwOnTombstoneUsage ? \"error\" : \"generic\",\n isSummarizerClient: this.clientDetails.type === summarizerClientType,\n callSite,\n },\n this.pkg,\n error,\n );\n if (this.throwOnTombstoneUsage) {\n throw error;\n }\n }\n }\n\n public getCreateChildSummarizerNodeFn(id: string, createParam: CreateChildSummarizerNodeParam) {\n return (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n ) => this.summarizerNode.createChild(\n summarizeInternal,\n id,\n createParam,\n // DDS will not create failure summaries\n { throwOnFailure: true },\n getGCDataFn,\n getBaseGCDetailsFn,\n );\n }\n\n public async uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>> {\n return this.containerRuntime.uploadBlob(blob);\n }\n}\n\nexport class RemoteFluidDataStoreContext extends FluidDataStoreContext {\n private readonly initSnapshotValue: ISnapshotTree | undefined;\n private readonly baseGCDetailsP: Promise<IGarbageCollectionDetailsBase>;\n\n constructor(props: IRemoteFluidDataStoreContextProps) {\n super(\n props,\n true /* existing */,\n BindState.Bound,\n false /* isLocalDataStore */,\n () => {\n throw new Error(\"Already attached\");\n },\n );\n\n this.initSnapshotValue = props.snapshotTree;\n this.baseGCDetailsP = new LazyPromise<IGarbageCollectionDetailsBase>(async () => {\n return (await props.getBaseGCDetails()) ?? {};\n });\n\n if (props.snapshotTree !== undefined) {\n this.summarizerNode.updateBaseSummaryState(props.snapshotTree);\n }\n }\n\n private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {\n let tree = this.initSnapshotValue;\n let isRootDataStore = true;\n\n if (!!tree && tree.blobs[dataStoreAttributesBlobName] !== undefined) {\n // Need to get through snapshot and use that to populate extraBlobs\n const attributes =\n await readAndParse<ReadFluidDataStoreAttributes>(this.storage, tree.blobs[dataStoreAttributesBlobName]);\n\n let pkgFromSnapshot: string[];\n // Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n // For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n const formatVersion = getAttributesFormatVersion(attributes);\n if (formatVersion < 1) {\n pkgFromSnapshot = attributes.pkg.startsWith(\"[\\\"\") && attributes.pkg.endsWith(\"\\\"]\")\n ? JSON.parse(attributes.pkg) as string[]\n : [attributes.pkg];\n } else {\n pkgFromSnapshot = JSON.parse(attributes.pkg) as string[];\n }\n this.pkg = pkgFromSnapshot;\n\n /**\n * If there is no isRootDataStore in the attributes blob, set it to true. This will ensure that\n * data stores in older documents are not garbage collected incorrectly. This may lead to additional\n * roots in the document but they won't break.\n */\n isRootDataStore = attributes.isRootDataStore ?? true;\n\n if (hasIsolatedChannels(attributes)) {\n tree = tree.trees[channelsTreeName];\n assert(tree !== undefined,\n 0x1fe /* \"isolated channels subtree should exist in remote datastore snapshot\" */);\n }\n }\n\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n pkg: this.pkg!,\n isRootDataStore,\n snapshot: tree,\n };\n });\n\n public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n return this.initialSnapshotDetailsP;\n }\n\n public async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n return this.baseGCDetailsP;\n }\n\n public generateAttachMessage(): IAttachMessage {\n throw new Error(\"Cannot attach remote store\");\n }\n}\n\n/**\n * Base class for detached & attached context classes\n */\nexport class LocalFluidDataStoreContextBase extends FluidDataStoreContext {\n private readonly snapshotTree: ISnapshotTree | undefined;\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n public readonly createProps?: any;\n\n constructor(props: ILocalFluidDataStoreContextProps) {\n super(\n props,\n props.snapshotTree !== undefined ? true : false /* existing */,\n props.snapshotTree ? BindState.Bound : BindState.NotBound,\n true /* isLocalDataStore */,\n props.makeLocallyVisibleFn,\n );\n\n this.snapshotTree = props.snapshotTree;\n if (props.isRootDataStore === true) {\n this.setInMemoryRoot();\n }\n this.createProps = props.createProps;\n this.attachListeners();\n }\n\n private attachListeners(): void {\n this.once(\"attaching\", () => {\n assert(this.attachState === AttachState.Detached, 0x14d /* \"Should move from detached to attaching\" */);\n this._attachState = AttachState.Attaching;\n });\n this.once(\"attached\", () => {\n assert(this.attachState === AttachState.Attaching, 0x14e /* \"Should move from attaching to attached\" */);\n this._attachState = AttachState.Attached;\n });\n }\n\n public generateAttachMessage(): IAttachMessage {\n assert(this.channel !== undefined, 0x14f /* \"There should be a channel when generating attach message\" */);\n assert(this.pkg !== undefined, 0x150 /* \"pkg should be available in local data store context\" */);\n\n const summarizeResult = this.channel.getAttachSummary();\n\n // Wrap dds summaries in .channels subtree.\n wrapSummaryInChannelsTree(summarizeResult);\n\n // Add data store's attributes to the summary.\n const attributes = createAttributes(\n this.pkg,\n this.isInMemoryRoot(),\n );\n addBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));\n\n // Attach message needs the summary in ITree format. Convert the ISummaryTree into an ITree.\n const snapshot = convertSummaryTreeToITree(summarizeResult.summary);\n\n const message: IAttachMessage = {\n id: this.id,\n snapshot,\n type: this.pkg[this.pkg.length - 1],\n };\n\n return message;\n }\n\n public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n let snapshot = this.snapshotTree;\n let attributes: ReadFluidDataStoreAttributes;\n let isRootDataStore = false;\n if (snapshot !== undefined) {\n // Get the dataStore attributes.\n // Note: storage can be undefined in special case while detached.\n attributes = await getFluidDataStoreAttributes(this.storage, snapshot);\n if (hasIsolatedChannels(attributes)) {\n snapshot = snapshot.trees[channelsTreeName];\n assert(snapshot !== undefined,\n 0x1ff /* \"isolated channels subtree should exist in local datastore snapshot\" */);\n }\n if (this.pkg === undefined) {\n this.pkg = JSON.parse(attributes.pkg) as string[];\n // If there is no isRootDataStore in the attributes blob, set it to true. This ensures that data\n // stores in older documents are not garbage collected incorrectly. This may lead to additional\n // roots in the document but they won't break.\n if (attributes.isRootDataStore ?? true) {\n isRootDataStore = true;\n this.setInMemoryRoot();\n }\n }\n }\n assert(this.pkg !== undefined, 0x152 /* \"pkg should be available in local data store\" */);\n\n return {\n pkg: this.pkg,\n isRootDataStore,\n snapshot,\n };\n }\n\n public async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n // Local data store does not have initial summary.\n return {};\n }\n}\n\n/**\n * context implementation for \"attached\" data store runtime.\n * Various workflows (snapshot creation, requests) result in .realize() being called\n * on context, resulting in instantiation and attachment of runtime.\n * Runtime is created using data store factory that is associated with this context.\n */\nexport class LocalFluidDataStoreContext extends LocalFluidDataStoreContextBase {\n constructor(props: ILocalFluidDataStoreContextProps) {\n super(props);\n }\n}\n\n/**\n * Detached context. Data Store runtime will be attached to it by attachRuntime() call\n * Before attachment happens, this context is not associated with particular type of runtime\n * or factory, i.e. it's package path is undefined.\n * Attachment process provides all missing parts - package path, data store runtime, and data store factory\n */\nexport class LocalDetachedFluidDataStoreContext\n extends LocalFluidDataStoreContextBase\n implements IFluidDataStoreContextDetached {\n constructor(props: ILocalFluidDataStoreContextProps) {\n super(props);\n this.detachedRuntimeCreation = true;\n }\n\n public async attachRuntime(\n registry: IProvideFluidDataStoreFactory,\n dataStoreChannel: IFluidDataStoreChannel) {\n assert(this.detachedRuntimeCreation, 0x154 /* \"runtime creation is already attached\" */);\n this.detachedRuntimeCreation = false;\n\n assert(this.channelDeferred === undefined, 0x155 /* \"channel deferral is already set\" */);\n this.channelDeferred = new Deferred<IFluidDataStoreChannel>();\n\n const factory = registry.IFluidDataStoreFactory;\n\n const entry = await this.factoryFromPackagePath(this.pkg);\n assert(entry.factory === factory, 0x156 /* \"Unexpected factory for package path\" */);\n\n assert(this.registry === undefined, 0x157 /* \"datastore registry already attached\" */);\n this.registry = entry.registry;\n\n super.bindRuntime(dataStoreChannel);\n\n // Load the handle to the data store's entryPoint to make sure that for a detached data store, the entryPoint\n // initialization function is called before the data store gets attached and potentially connected to the\n // delta stream, so it gets a chance to do things while the data store is still \"purely local\".\n // This preserves the behavior from before we introduced entryPoints, where the instantiateDataStore method\n // of data store factories tends to construct the data object (at least kick off an async method that returns\n // it); that code moved to the entryPoint initialization function, so we want to ensure it still executes\n // before the data store is attached.\n await dataStoreChannel.entryPoint?.get();\n\n if (await this.isRoot()) {\n dataStoreChannel.makeVisibleAndAttachGraph();\n }\n }\n\n public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n if (this.detachedRuntimeCreation) {\n throw new Error(\"Detached Fluid Data Store context can't be realized! Please attach runtime first!\");\n }\n return super.getInitialSnapshotDetails();\n }\n}\n"]}
1
+ {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,iFAK+C;AAC/C,+DAKsC;AAEtC,+DAA4D;AAC5D,iEAA8D;AAY9D,6EAqB6C;AAC7C,iEAGuC;AACvC,qEAOyC;AACzC,qEAIyC;AAGzC,mDAQyB;AACzB,6EAAwE;AACxE,uFAAyE;AACzE,yEAAkE;AAElE,SAAS,gBAAgB,CACrB,GAAsB,EACtB,eAAwB;IAExB,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;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AI,CAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACvF,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAE/B,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QAEpC,6GAA6G;QAC7G,yGAAyG;QACzG,+FAA+F;QAC/F,2GAA2G;QAC3G,6GAA6G;QAC7G,yGAAyG;QACzG,qCAAqC;QACrC,MAAM,CAAA,MAAA,gBAAgB,CAAC,UAAU,0CAAE,GAAG,EAAE,CAAA,CAAC;QAEzC,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE;YACrB,gBAAgB,CAAC,yBAAyB,EAAE,CAAC;SAChD;IACL,CAAC;IAEM,KAAK,CAAC,yBAAyB;QAClC,IAAI,IAAI,CAAC,uBAAuB,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC,CAAC;SACxG;QACD,OAAO,KAAK,CAAC,yBAAyB,EAAE,CAAC;IAC7C,CAAC;CACJ;AA/CD,gFA+CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, ITelemetryLogger, ITelemetryProperties } from \"@fluidframework/common-definitions\";\nimport {\n FluidObject,\n IRequest,\n IResponse,\n IFluidHandle,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n assert,\n Deferred,\n LazyPromise,\n TypedEventEmitter,\n} from \"@fluidframework/common-utils\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { readAndParse } from \"@fluidframework/driver-utils\";\nimport { BlobTreeEntry } from \"@fluidframework/protocol-base\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITreeEntry,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IContainerRuntime,\n} from \"@fluidframework/container-runtime-definitions\";\nimport {\n BindState,\n channelsTreeName,\n CreateChildSummarizerNodeFn,\n CreateChildSummarizerNodeParam,\n FluidDataStoreRegistryEntry,\n IAttachMessage,\n IFluidDataStoreChannel,\n IFluidDataStoreContext,\n IFluidDataStoreContextDetached,\n IFluidDataStoreContextEvents,\n IFluidDataStoreRegistry,\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IInboundSignalMessage,\n IProvideFluidDataStoreFactory,\n ISummarizeInternalResult,\n ISummarizeResult,\n ISummarizerNodeWithGC,\n SummarizeInternalFn,\n ITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n addBlobToSummary,\n convertSummaryTreeToITree,\n} from \"@fluidframework/runtime-utils\";\nimport {\n ChildLogger,\n loggerToMonitoringContext,\n LoggingError,\n MonitoringContext,\n TelemetryDataTag,\n ThresholdCounter,\n} from \"@fluidframework/telemetry-utils\";\nimport {\n DataCorruptionError,\n DataProcessingError,\n extractSafePropertiesFromMessage,\n} from \"@fluidframework/container-utils\";\n\nimport { ContainerRuntime } from \"./containerRuntime\";\nimport {\n dataStoreAttributesBlobName,\n hasIsolatedChannels,\n wrapSummaryInChannelsTree,\n ReadFluidDataStoreAttributes,\n WriteFluidDataStoreAttributes,\n getAttributesFormatVersion,\n getFluidDataStoreAttributes,\n} from \"./summaryFormat\";\nimport { throwOnTombstoneUsageKey } from \"./garbageCollectionConstants\";\nimport { sendGCTombstoneEvent } from \"./garbageCollectionTombstoneUtils\";\nimport { summarizerClientType } from \"./summarizerClientElection\";\n\nfunction createAttributes(\n pkg: readonly string[],\n isRootDataStore: boolean,\n): WriteFluidDataStoreAttributes {\n const stringifiedPkg = JSON.stringify(pkg);\n return {\n pkg: stringifiedPkg,\n summaryFormatVersion: 2,\n isRootDataStore,\n };\n}\nexport function createAttributesBlob(\n pkg: readonly string[],\n isRootDataStore: boolean,\n): ITreeEntry {\n const attributes = createAttributes(pkg, isRootDataStore);\n return new BlobTreeEntry(dataStoreAttributesBlobName, JSON.stringify(attributes));\n}\n\ninterface ISnapshotDetails {\n pkg: readonly string[];\n isRootDataStore: boolean;\n snapshot?: ISnapshotTree;\n}\n\ninterface FluidDataStoreMessage {\n content: any;\n type: string;\n}\n\n/** Properties necessary for creating a FluidDataStoreContext */\nexport interface IFluidDataStoreContextProps {\n readonly id: string;\n readonly runtime: ContainerRuntime;\n readonly storage: IDocumentStorageService;\n readonly scope: FluidObject;\n readonly createSummarizerNodeFn: CreateChildSummarizerNodeFn;\n readonly pkg?: Readonly<string[]>;\n}\n\n/** Properties necessary for creating a local FluidDataStoreContext */\nexport interface ILocalFluidDataStoreContextProps extends IFluidDataStoreContextProps {\n readonly pkg: Readonly<string[]> | undefined;\n readonly snapshotTree: ISnapshotTree | undefined;\n readonly isRootDataStore: boolean | undefined;\n readonly makeLocallyVisibleFn: () => void;\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n}\n\n/** Properties necessary for creating a remote FluidDataStoreContext */\nexport interface IRemoteFluidDataStoreContextProps extends IFluidDataStoreContextProps {\n readonly snapshotTree: ISnapshotTree | undefined;\n readonly getBaseGCDetails: () => Promise<IGarbageCollectionDetailsBase | undefined>;\n}\n\n/**\n * Represents the context for the store. This context is passed to the store runtime.\n */\nexport abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidDataStoreContextEvents> implements\n IFluidDataStoreContext,\n IDisposable {\n public get packagePath(): readonly string[] {\n assert(this.pkg !== undefined, 0x139 /* \"Undefined package path\" */);\n return this.pkg;\n }\n\n public get options(): ILoaderOptions {\n return this._containerRuntime.options;\n }\n\n public get clientId(): string | undefined {\n return this._containerRuntime.clientId;\n }\n\n public get clientDetails(): IClientDetails {\n return this._containerRuntime.clientDetails;\n }\n\n public get logger(): ITelemetryLogger {\n return this._containerRuntime.logger;\n }\n\n public get deltaManager(): IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> {\n return this._containerRuntime.deltaManager;\n }\n\n public get connected(): boolean {\n return this._containerRuntime.connected;\n }\n\n public get IFluidHandleContext() {\n return this._containerRuntime.IFluidHandleContext;\n }\n\n public get containerRuntime(): IContainerRuntime {\n return this._containerRuntime;\n }\n\n public ensureNoDataModelChanges<T>(callback: () => T): T {\n return this._containerRuntime.ensureNoDataModelChanges(callback);\n }\n\n public get isLoaded(): boolean {\n return this.loaded;\n }\n\n public get baseSnapshot(): ISnapshotTree | undefined {\n return this._baseSnapshot;\n }\n\n private _disposed = false;\n public get disposed() { return this._disposed; }\n\n /**\n * Tombstone is a temporary feature that prevents a data store from sending / receiving ops, signals and from\n * loading.\n */\n private _tombstoned = false;\n public get tombstoned() { return this._tombstoned; }\n /** If true, throw an error when a tombstone data store is used. */\n private readonly throwOnTombstoneUsage: boolean;\n\n public get attachState(): AttachState {\n return this._attachState;\n }\n\n public get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined {\n return this.registry;\n }\n\n /**\n * A datastore is considered as root if it\n * 1. is root in memory - see isInMemoryRoot\n * 2. is root as part of the base snapshot that the datastore loaded from\n * @returns whether a datastore is root\n */\n public async isRoot(): Promise<boolean> {\n return this.isInMemoryRoot() || (await this.getInitialSnapshotDetails()).isRootDataStore;\n }\n\n /**\n * There are 3 states where isInMemoryRoot needs to be true\n * 1. when a datastore becomes aliased. This can happen for both remote and local datastores\n * 2. when a datastore is created locally as root\n * 3. when a datastore is created locally as root and is rehydrated\n * @returns whether a datastore is root in memory\n */\n protected isInMemoryRoot(): boolean {\n return this._isInMemoryRoot;\n }\n\n protected registry: IFluidDataStoreRegistry | undefined;\n\n protected detachedRuntimeCreation = false;\n /** @deprecated - To be replaced by calling makeLocallyVisible directly */\n public readonly bindToContext: () => void;\n protected channel: IFluidDataStoreChannel | undefined;\n private loaded = false;\n protected pending: ISequencedDocumentMessage[] | undefined = [];\n protected channelDeferred: Deferred<IFluidDataStoreChannel> | undefined;\n private _baseSnapshot: ISnapshotTree | undefined;\n protected _attachState: AttachState;\n private _isInMemoryRoot: boolean = false;\n protected readonly summarizerNode: ISummarizerNodeWithGC;\n private readonly mc: MonitoringContext;\n private readonly thresholdOpsCounter: ThresholdCounter;\n private static readonly pendingOpsCountThreshold = 1000;\n\n // The used routes of this node as per the last GC run. This is used to update the used routes of the channel\n // if it realizes after GC is run.\n private lastUsedRoutes: string[] | undefined;\n\n public readonly id: string;\n private readonly _containerRuntime: ContainerRuntime;\n public readonly storage: IDocumentStorageService;\n public readonly scope: FluidObject;\n protected pkg?: readonly string[];\n\n constructor(\n props: IFluidDataStoreContextProps,\n private readonly existing: boolean,\n private bindState: BindState, // Used to assert for state tracking purposes\n public readonly isLocalDataStore: boolean,\n private readonly makeLocallyVisibleFn: () => void,\n ) {\n super();\n\n this._containerRuntime = props.runtime;\n this.id = props.id;\n this.storage = props.storage;\n this.scope = props.scope;\n this.pkg = props.pkg;\n\n // URIs use slashes as delimiters. Handles use URIs.\n // Thus having slashes in types almost guarantees trouble down the road!\n assert(!this.id.includes(\"/\"), 0x13a /* Data store ID contains slash */);\n\n this._attachState = this.containerRuntime.attachState !== AttachState.Detached && this.existing ?\n this.containerRuntime.attachState : AttachState.Detached;\n\n this.bindToContext = () => {\n assert(this.bindState === BindState.NotBound, 0x13b /* \"datastore context is already in bound state\" */);\n this.bindState = BindState.Binding;\n assert(this.channel !== undefined, 0x13c /* \"undefined channel on datastore context\" */);\n this.makeLocallyVisible();\n this.bindState = BindState.Bound;\n };\n\n const thisSummarizeInternal =\n async (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext) =>\n this.summarizeInternal(fullTree, trackState, telemetryContext);\n\n this.summarizerNode = props.createSummarizerNodeFn(\n thisSummarizeInternal,\n async (fullGC?: boolean) => this.getGCDataInternal(fullGC),\n async () => this.getBaseGCDetails(),\n );\n\n this.mc = loggerToMonitoringContext(ChildLogger.create(this.logger, \"FluidDataStoreContext\"));\n this.thresholdOpsCounter = new ThresholdCounter(FluidDataStoreContext.pendingOpsCountThreshold, this.mc.logger);\n\n // Tombstone should only throw when the feature flag is enabled and the client isn't a summarizer\n this.throwOnTombstoneUsage =\n this.mc.config.getBoolean(throwOnTombstoneUsageKey) === true &&\n this.clientDetails.type !== summarizerClientType;\n }\n\n public dispose(): void {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n\n // Dispose any pending runtime after it gets fulfilled\n // Errors are logged where this.channelDeferred is consumed/generated (realizeCore(), bindRuntime())\n if (this.channelDeferred) {\n this.channelDeferred.promise.then((runtime) => {\n runtime.dispose();\n }).catch((error) => { });\n }\n }\n\n public setTombstone(tombstone: boolean) {\n if (this.tombstoned === tombstone) {\n return;\n }\n\n this._tombstoned = tombstone;\n }\n\n private rejectDeferredRealize(reason: string, packageName?: string): never {\n throw new LoggingError(reason, { packageName: { value: packageName, tag: TelemetryDataTag.CodeArtifact } });\n }\n\n public async realize(): Promise<IFluidDataStoreChannel> {\n assert(!this.detachedRuntimeCreation, 0x13d /* \"Detached runtime creation on realize()\" */);\n if (!this.channelDeferred) {\n this.channelDeferred = new Deferred<IFluidDataStoreChannel>();\n this.realizeCore(this.existing).catch((error) => {\n const errorWrapped = DataProcessingError.wrapIfUnrecognized(error, \"realizeFluidDataStoreContext\");\n errorWrapped.addTelemetryProperties({\n fluidDataStoreId: {\n value: this.id,\n tag: TelemetryDataTag.CodeArtifact,\n },\n });\n this.channelDeferred?.reject(errorWrapped);\n this.logger.sendErrorEvent({ eventName: \"RealizeError\" }, errorWrapped);\n });\n }\n return this.channelDeferred.promise;\n }\n\n protected async factoryFromPackagePath(packages?: readonly string[]) {\n assert(this.pkg === packages, 0x13e /* \"Unexpected package path\" */);\n if (packages === undefined) {\n this.rejectDeferredRealize(\"packages is undefined\");\n }\n\n let entry: FluidDataStoreRegistryEntry | undefined;\n let registry: IFluidDataStoreRegistry | undefined = this._containerRuntime.IFluidDataStoreRegistry;\n let lastPkg: string | undefined;\n for (const pkg of packages) {\n if (!registry) {\n this.rejectDeferredRealize(\"No registry for package\", lastPkg);\n }\n lastPkg = pkg;\n entry = await registry.get(pkg);\n if (!entry) {\n this.rejectDeferredRealize(\"Registry does not contain entry for the package\", pkg);\n }\n registry = entry.IFluidDataStoreRegistry;\n }\n const factory = entry?.IFluidDataStoreFactory;\n if (factory === undefined) {\n this.rejectDeferredRealize(\"Can't find factory for package\", lastPkg);\n }\n\n return { factory, registry };\n }\n\n private async realizeCore(existing: boolean): Promise<void> {\n const details = await this.getInitialSnapshotDetails();\n // Base snapshot is the baseline where pending ops are applied to.\n // It is important that this be in sync with the pending ops, and also\n // that it is set here, before bindRuntime is called.\n this._baseSnapshot = details.snapshot;\n const packages = details.pkg;\n\n const { factory, registry } = await this.factoryFromPackagePath(packages);\n\n assert(this.registry === undefined, 0x13f /* \"datastore context registry is already set\" */);\n this.registry = registry;\n\n const channel = await factory.instantiateDataStore(this, existing);\n assert(channel !== undefined, 0x140 /* \"undefined channel on datastore context\" */);\n this.bindRuntime(channel);\n }\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. Its old ID when in disconnected state and\n * its new client ID when we are connecting or connected.\n */\n public setConnectionState(connected: boolean, clientId?: string) {\n // ConnectionState should not fail in tombstone mode as this is internally run\n this.verifyNotClosed(\"setConnectionState\", false /* checkTombstone */);\n\n // Connection events are ignored if the store is not yet loaded\n if (!this.loaded) {\n return;\n }\n\n assert(this.connected === connected, 0x141 /* \"Unexpected connected state\" */);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.channel!.setConnectionState(connected, clientId);\n }\n\n public process(messageArg: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void {\n this.verifyNotClosed(\"process\", true, extractSafePropertiesFromMessage(messageArg));\n\n const innerContents = messageArg.contents as FluidDataStoreMessage;\n const message = {\n ...messageArg,\n type: innerContents.type,\n contents: innerContents.content,\n };\n\n this.summarizerNode.recordChange(message);\n\n if (this.loaded) {\n return this.channel?.process(message, local, localOpMetadata);\n } else {\n assert(!local, 0x142 /* \"local store channel is not loaded\" */);\n assert(this.pending !== undefined, 0x23d /* \"pending is undefined\" */);\n this.pending.push(message);\n this.thresholdOpsCounter.sendIfMultiple(\"StorePendingOps\", this.pending.length);\n }\n }\n\n public processSignal(message: IInboundSignalMessage, local: boolean): void {\n this.verifyNotClosed(\"processSignal\");\n\n // Signals are ignored if the store is not yet loaded\n if (!this.loaded) {\n return;\n }\n\n this.channel?.processSignal(message, local);\n }\n\n public getQuorum(): IQuorumClients {\n return this._containerRuntime.getQuorum();\n }\n\n public getAudience(): IAudience {\n return this._containerRuntime.getAudience();\n }\n\n /**\n * Returns a summary at the current sequence number.\n * @param fullTree - true to bypass optimizations and force a full summary tree\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n public async summarize(\n fullTree: boolean = false,\n trackState: boolean = true,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult> {\n return this.summarizerNode.summarize(fullTree, trackState, telemetryContext);\n }\n\n private async summarizeInternal(\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeInternalResult> {\n await this.realize();\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const summarizeResult = await this.channel!.summarize(fullTree, trackState, telemetryContext);\n\n // Wrap dds summaries in .channels subtree.\n wrapSummaryInChannelsTree(summarizeResult);\n const pathPartsForChildren = [channelsTreeName];\n\n // Add data store's attributes to the summary.\n const { pkg } = await this.getInitialSnapshotDetails();\n const isRoot = await this.isRoot();\n const attributes = createAttributes(pkg, isRoot);\n addBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));\n\n // If we are not referenced, mark the summary tree as unreferenced. Also, update unreferenced blob\n // size in the summary stats with the blobs size of this data store.\n if (!this.summarizerNode.isReferenced()) {\n summarizeResult.summary.unreferenced = true;\n summarizeResult.stats.unreferencedBlobSize = summarizeResult.stats.totalBlobSize;\n }\n\n return {\n ...summarizeResult,\n id: this.id,\n pathPartsForChildren,\n };\n }\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this data store\n * including any of its child channel contexts. Each node has a set of outbound routes to other GC nodes in the\n * document.\n * If there is no new data in this data store since the last summary, previous GC data is used.\n * If there is new data, the GC data is generated again (by calling getGCDataInternal).\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n public async getGCData(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n return this.summarizerNode.getGCData(fullGC);\n }\n\n /**\n * Generates data used for garbage collection. This is called when there is new data since last summary. It\n * realizes the data store and calls into each channel context to get its GC data.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n private async getGCDataInternal(fullGC: boolean = false): Promise<IGarbageCollectionData> {\n await this.realize();\n assert(this.channel !== undefined, 0x143 /* \"Channel should not be undefined when running GC\" */);\n\n return this.channel.getGCData(fullGC);\n }\n\n /**\n * After GC has run, called to notify the data store of routes used in it. These are used for the following:\n *\n * 1. To identify if this data store is being referenced in the document or not.\n *\n * 2. To determine if it needs to re-summarize in case used routes changed since last summary.\n *\n * 3. These are added to the summary generated by the data store.\n *\n * 4. To notify child contexts of their used routes. This is done immediately if the data store is loaded.\n * Else, it is done when realizing the data store.\n *\n * 5. To update the timestamp when this data store or any children are marked as unreferenced.\n *\n * @param usedRoutes - The routes that are used in this data store.\n */\n public updateUsedRoutes(usedRoutes: string[]) {\n // Update the used routes in this data store's summarizer node.\n this.summarizerNode.updateUsedRoutes(usedRoutes);\n\n /**\n * Store the used routes to update the channel if the data store is not loaded yet. If the used routes changed\n * since the previous run, the data store will be loaded during summarize since the used state changed. So, it's\n * safe to only store the last used routes.\n */\n this.lastUsedRoutes = usedRoutes;\n\n // If we are loaded, call the channel so it can update the used routes of the child contexts.\n // If we are not loaded, we will update this when we are realized.\n if (this.loaded) {\n this.updateChannelUsedRoutes();\n }\n }\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n public addedGCOutboundReference(srcHandle: IFluidHandle, outboundHandle: IFluidHandle) {\n this._containerRuntime.addedGCOutboundReference(srcHandle, outboundHandle);\n }\n\n /**\n * Updates the used routes of the channel and its child contexts. The channel must be loaded before calling this.\n * It is called in these two scenarios:\n * 1. When the used routes of the data store is updated and the data store is loaded.\n * 2. When the data store is realized. This updates the channel's used routes as per last GC run.\n */\n private updateChannelUsedRoutes() {\n assert(this.loaded, 0x144 /* \"Channel should be loaded when updating used routes\" */);\n assert(this.channel !== undefined, 0x145 /* \"Channel should be present when data store is loaded\" */);\n\n // If there is no lastUsedRoutes, GC has not run up until this point.\n if (this.lastUsedRoutes === undefined) {\n return;\n }\n\n // Remove the route to this data store, if it exists.\n const usedChannelRoutes = this.lastUsedRoutes.filter(\n (id: string) => { return id !== \"/\" && id !== \"\"; },\n );\n this.channel.updateUsedRoutes(usedChannelRoutes);\n }\n\n /**\n * @deprecated 0.18.Should call request on the runtime directly\n */\n public async request(request: IRequest): Promise<IResponse> {\n const runtime = await this.realize();\n return runtime.request(request);\n }\n\n public submitMessage(type: string, content: any, localOpMetadata: unknown): void {\n this.verifyNotClosed(\"submitMessage\");\n assert(!!this.channel, 0x146 /* \"Channel must exist when submitting message\" */);\n const fluidDataStoreContent: FluidDataStoreMessage = {\n content,\n type,\n };\n this._containerRuntime.submitDataStoreOp(\n this.id,\n fluidDataStoreContent,\n localOpMetadata);\n }\n\n /**\n * This is called from a SharedSummaryBlock that does not generate ops but only wants to be part of the summary.\n * It indicates that there is data in the object that needs to be summarized.\n * We will update the latestSequenceNumber of the summary tracker of this\n * store and of the object's channel.\n *\n * @param address - The address of the channel that is dirty.\n *\n */\n public setChannelDirty(address: string): void {\n this.verifyNotClosed(\"setChannelDirty\");\n\n // Get the latest sequence number.\n const latestSequenceNumber = this.deltaManager.lastSequenceNumber;\n\n this.summarizerNode.invalidate(latestSequenceNumber);\n\n const channelSummarizerNode = this.summarizerNode.getChild(address);\n\n if (channelSummarizerNode) {\n channelSummarizerNode.invalidate(latestSequenceNumber); // TODO: lazy load problem?\n }\n }\n\n public submitSignal(type: string, content: any) {\n this.verifyNotClosed(\"submitSignal\");\n\n assert(!!this.channel, 0x147 /* \"Channel must exist on submitting signal\" */);\n return this._containerRuntime.submitDataStoreSignal(this.id, type, content);\n }\n\n /**\n * This is called by the data store channel when it becomes locally visible indicating that it is ready to become\n * globally visible now.\n */\n public makeLocallyVisible() {\n assert(this.channel !== undefined, 0x2cf /* \"undefined channel on datastore context\" */);\n this.makeLocallyVisibleFn();\n }\n\n protected bindRuntime(channel: IFluidDataStoreChannel) {\n if (this.channel) {\n throw new Error(\"Runtime already bound\");\n }\n\n try {\n assert(!this.detachedRuntimeCreation, 0x148 /* \"Detached runtime creation on runtime bind\" */);\n assert(this.channelDeferred !== undefined, 0x149 /* \"Undefined channel deferral\" */);\n assert(this.pkg !== undefined, 0x14a /* \"Undefined package path\" */);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const pending = this.pending!;\n\n // Apply all pending ops\n for (const op of pending) {\n channel.process(op, false, undefined /* localOpMetadata */);\n }\n\n this.thresholdOpsCounter.send(\"ProcessPendingOps\", pending.length);\n this.pending = undefined;\n\n // And now mark the runtime active\n this.loaded = true;\n this.channel = channel;\n\n // Freeze the package path to ensure that someone doesn't modify it when it is\n // returned in packagePath().\n Object.freeze(this.pkg);\n\n /**\n * Update the used routes of the channel. If GC has run before this data store was realized, we will have\n * the used routes saved. So, this will ensure that all the child contexts have up-to-date used routes as\n * per the last time GC was run.\n * Also, this data store may have been realized during summarize. In that case, the child contexts need to\n * have their used routes updated to determine if its needs to summarize again and to add it to the summary.\n */\n this.updateChannelUsedRoutes();\n\n // And notify the pending promise it is now available\n this.channelDeferred.resolve(this.channel);\n } catch (error) {\n this.channelDeferred?.reject(error);\n this.logger.sendErrorEvent(\n {\n eventName: \"BindRuntimeError\", fluidDataStoreId: {\n value: this.id,\n tag: TelemetryDataTag.CodeArtifact,\n },\n },\n error);\n }\n }\n\n public async getAbsoluteUrl(relativeUrl: string): Promise<string | undefined> {\n if (this.attachState !== AttachState.Attached) {\n return undefined;\n }\n return this._containerRuntime.getAbsoluteUrl(relativeUrl);\n }\n\n public abstract generateAttachMessage(): IAttachMessage;\n\n public abstract getInitialSnapshotDetails(): Promise<ISnapshotDetails>;\n\n /**\n * @deprecated Sets the datastore as root, for aliasing purposes: #7948\n * This method should not be used outside of the aliasing context.\n * It will be removed, as the source of truth for this flag will be the aliasing blob.\n */\n public setInMemoryRoot(): void {\n this._isInMemoryRoot = true;\n }\n\n public abstract getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n public reSubmit(contents: any, localOpMetadata: unknown) {\n assert(!!this.channel, 0x14b /* \"Channel must exist when resubmitting ops\" */);\n const innerContents = contents as FluidDataStoreMessage;\n this.channel.reSubmit(innerContents.type, innerContents.content, localOpMetadata);\n }\n\n public rollback(contents: any, localOpMetadata: unknown) {\n if (!this.channel) {\n throw new Error(\"Channel must exist when rolling back ops\");\n }\n if (!this.channel.rollback) {\n throw new Error(\"Channel doesn't support rollback\");\n }\n const innerContents = contents as FluidDataStoreMessage;\n this.channel.rollback(innerContents.type, innerContents.content, localOpMetadata);\n }\n\n public async applyStashedOp(contents: any): Promise<unknown> {\n if (!this.channel) {\n await this.realize();\n }\n assert(!!this.channel, 0x14c /* \"Channel must exist when rebasing ops\" */);\n const innerContents = contents as FluidDataStoreMessage;\n return this.channel.applyStashedOp(innerContents.content);\n }\n\n private verifyNotClosed(callSite: string, checkTombstone = true, safeTelemetryProps: ITelemetryProperties = {}) {\n if (this._disposed) {\n throw new Error(`Context is closed! Call site [${callSite}]`);\n }\n\n if (checkTombstone && this.tombstoned) {\n const messageString = `Context is tombstoned! Call site [${callSite}]`;\n const error = new DataCorruptionError(messageString, safeTelemetryProps);\n\n sendGCTombstoneEvent(\n this.mc,\n {\n eventName: \"GC_Tombstone_DataStore_Changed\",\n category: this.throwOnTombstoneUsage ? \"error\" : \"generic\",\n isSummarizerClient: this.clientDetails.type === summarizerClientType,\n callSite,\n },\n this.pkg,\n error,\n );\n if (this.throwOnTombstoneUsage) {\n throw error;\n }\n }\n }\n\n public getCreateChildSummarizerNodeFn(id: string, createParam: CreateChildSummarizerNodeParam) {\n return (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n ) => this.summarizerNode.createChild(\n summarizeInternal,\n id,\n createParam,\n // DDS will not create failure summaries\n { throwOnFailure: true },\n getGCDataFn,\n getBaseGCDetailsFn,\n );\n }\n\n public async uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>> {\n return this.containerRuntime.uploadBlob(blob);\n }\n}\n\nexport class RemoteFluidDataStoreContext extends FluidDataStoreContext {\n private readonly initSnapshotValue: ISnapshotTree | undefined;\n private readonly baseGCDetailsP: Promise<IGarbageCollectionDetailsBase>;\n\n constructor(props: IRemoteFluidDataStoreContextProps) {\n super(\n props,\n true /* existing */,\n BindState.Bound,\n false /* isLocalDataStore */,\n () => {\n throw new Error(\"Already attached\");\n },\n );\n\n this.initSnapshotValue = props.snapshotTree;\n this.baseGCDetailsP = new LazyPromise<IGarbageCollectionDetailsBase>(async () => {\n return (await props.getBaseGCDetails()) ?? {};\n });\n\n if (props.snapshotTree !== undefined) {\n this.summarizerNode.updateBaseSummaryState(props.snapshotTree);\n }\n }\n\n private readonly initialSnapshotDetailsP = new LazyPromise<ISnapshotDetails>(async () => {\n let tree = this.initSnapshotValue;\n let isRootDataStore = true;\n\n if (!!tree && tree.blobs[dataStoreAttributesBlobName] !== undefined) {\n // Need to get through snapshot and use that to populate extraBlobs\n const attributes =\n await readAndParse<ReadFluidDataStoreAttributes>(this.storage, tree.blobs[dataStoreAttributesBlobName]);\n\n let pkgFromSnapshot: string[];\n // Use the snapshotFormatVersion to determine how the pkg is encoded in the snapshot.\n // For snapshotFormatVersion = \"0.1\" (1) or above, pkg is jsonified, otherwise it is just a string.\n const formatVersion = getAttributesFormatVersion(attributes);\n if (formatVersion < 1) {\n pkgFromSnapshot = attributes.pkg.startsWith(\"[\\\"\") && attributes.pkg.endsWith(\"\\\"]\")\n ? JSON.parse(attributes.pkg) as string[]\n : [attributes.pkg];\n } else {\n pkgFromSnapshot = JSON.parse(attributes.pkg) as string[];\n }\n this.pkg = pkgFromSnapshot;\n\n /**\n * If there is no isRootDataStore in the attributes blob, set it to true. This will ensure that\n * data stores in older documents are not garbage collected incorrectly. This may lead to additional\n * roots in the document but they won't break.\n */\n isRootDataStore = attributes.isRootDataStore ?? true;\n\n if (hasIsolatedChannels(attributes)) {\n tree = tree.trees[channelsTreeName];\n assert(tree !== undefined,\n 0x1fe /* \"isolated channels subtree should exist in remote datastore snapshot\" */);\n }\n }\n\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n pkg: this.pkg!,\n isRootDataStore,\n snapshot: tree,\n };\n });\n\n public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n return this.initialSnapshotDetailsP;\n }\n\n public async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n return this.baseGCDetailsP;\n }\n\n public generateAttachMessage(): IAttachMessage {\n throw new Error(\"Cannot attach remote store\");\n }\n}\n\n/**\n * Base class for detached & attached context classes\n */\nexport class LocalFluidDataStoreContextBase extends FluidDataStoreContext {\n private readonly snapshotTree: ISnapshotTree | undefined;\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n public readonly createProps?: any;\n\n constructor(props: ILocalFluidDataStoreContextProps) {\n super(\n props,\n props.snapshotTree !== undefined ? true : false /* existing */,\n props.snapshotTree ? BindState.Bound : BindState.NotBound,\n true /* isLocalDataStore */,\n props.makeLocallyVisibleFn,\n );\n\n this.snapshotTree = props.snapshotTree;\n if (props.isRootDataStore === true) {\n this.setInMemoryRoot();\n }\n this.createProps = props.createProps;\n this.attachListeners();\n }\n\n private attachListeners(): void {\n this.once(\"attaching\", () => {\n assert(this.attachState === AttachState.Detached, 0x14d /* \"Should move from detached to attaching\" */);\n this._attachState = AttachState.Attaching;\n });\n this.once(\"attached\", () => {\n assert(this.attachState === AttachState.Attaching, 0x14e /* \"Should move from attaching to attached\" */);\n this._attachState = AttachState.Attached;\n });\n }\n\n public generateAttachMessage(): IAttachMessage {\n assert(this.channel !== undefined, 0x14f /* \"There should be a channel when generating attach message\" */);\n assert(this.pkg !== undefined, 0x150 /* \"pkg should be available in local data store context\" */);\n\n const summarizeResult = this.channel.getAttachSummary();\n\n // Wrap dds summaries in .channels subtree.\n wrapSummaryInChannelsTree(summarizeResult);\n\n // Add data store's attributes to the summary.\n const attributes = createAttributes(\n this.pkg,\n this.isInMemoryRoot(),\n );\n addBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));\n\n // Attach message needs the summary in ITree format. Convert the ISummaryTree into an ITree.\n const snapshot = convertSummaryTreeToITree(summarizeResult.summary);\n\n const message: IAttachMessage = {\n id: this.id,\n snapshot,\n type: this.pkg[this.pkg.length - 1],\n };\n\n return message;\n }\n\n public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n let snapshot = this.snapshotTree;\n let attributes: ReadFluidDataStoreAttributes;\n let isRootDataStore = false;\n if (snapshot !== undefined) {\n // Get the dataStore attributes.\n // Note: storage can be undefined in special case while detached.\n attributes = await getFluidDataStoreAttributes(this.storage, snapshot);\n if (hasIsolatedChannels(attributes)) {\n snapshot = snapshot.trees[channelsTreeName];\n assert(snapshot !== undefined,\n 0x1ff /* \"isolated channels subtree should exist in local datastore snapshot\" */);\n }\n if (this.pkg === undefined) {\n this.pkg = JSON.parse(attributes.pkg) as string[];\n // If there is no isRootDataStore in the attributes blob, set it to true. This ensures that data\n // stores in older documents are not garbage collected incorrectly. This may lead to additional\n // roots in the document but they won't break.\n if (attributes.isRootDataStore ?? true) {\n isRootDataStore = true;\n this.setInMemoryRoot();\n }\n }\n }\n assert(this.pkg !== undefined, 0x152 /* \"pkg should be available in local data store\" */);\n\n return {\n pkg: this.pkg,\n isRootDataStore,\n snapshot,\n };\n }\n\n public async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n // Local data store does not have initial summary.\n return {};\n }\n}\n\n/**\n * context implementation for \"attached\" data store runtime.\n * Various workflows (snapshot creation, requests) result in .realize() being called\n * on context, resulting in instantiation and attachment of runtime.\n * Runtime is created using data store factory that is associated with this context.\n */\nexport class LocalFluidDataStoreContext extends LocalFluidDataStoreContextBase {\n constructor(props: ILocalFluidDataStoreContextProps) {\n super(props);\n }\n}\n\n/**\n * Detached context. Data Store runtime will be attached to it by attachRuntime() call\n * Before attachment happens, this context is not associated with particular type of runtime\n * or factory, i.e. it's package path is undefined.\n * Attachment process provides all missing parts - package path, data store runtime, and data store factory\n */\nexport class LocalDetachedFluidDataStoreContext\n extends LocalFluidDataStoreContextBase\n implements IFluidDataStoreContextDetached {\n constructor(props: ILocalFluidDataStoreContextProps) {\n super(props);\n this.detachedRuntimeCreation = true;\n }\n\n public async attachRuntime(\n registry: IProvideFluidDataStoreFactory,\n dataStoreChannel: IFluidDataStoreChannel) {\n assert(this.detachedRuntimeCreation, 0x154 /* \"runtime creation is already attached\" */);\n this.detachedRuntimeCreation = false;\n\n assert(this.channelDeferred === undefined, 0x155 /* \"channel deferral is already set\" */);\n this.channelDeferred = new Deferred<IFluidDataStoreChannel>();\n\n const factory = registry.IFluidDataStoreFactory;\n\n const entry = await this.factoryFromPackagePath(this.pkg);\n assert(entry.factory === factory, 0x156 /* \"Unexpected factory for package path\" */);\n\n assert(this.registry === undefined, 0x157 /* \"datastore registry already attached\" */);\n this.registry = entry.registry;\n\n super.bindRuntime(dataStoreChannel);\n\n // Load the handle to the data store's entryPoint to make sure that for a detached data store, the entryPoint\n // initialization function is called before the data store gets attached and potentially connected to the\n // delta stream, so it gets a chance to do things while the data store is still \"purely local\".\n // This preserves the behavior from before we introduced entryPoints, where the instantiateDataStore method\n // of data store factories tends to construct the data object (at least kick off an async method that returns\n // it); that code moved to the entryPoint initialization function, so we want to ensure it still executes\n // before the data store is attached.\n await dataStoreChannel.entryPoint?.get();\n\n if (await this.isRoot()) {\n dataStoreChannel.makeVisibleAndAttachGraph();\n }\n }\n\n public async getInitialSnapshotDetails(): Promise<ISnapshotDetails> {\n if (this.detachedRuntimeCreation) {\n throw new Error(\"Detached Fluid Data Store context can't be realized! Please attach runtime first!\");\n }\n return super.getInitialSnapshotDetails();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"outbox.d.ts","sourceRoot":"","sources":["../../src/opLifecycle/outbox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAG1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAU,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IAExD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAC3C;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,QAAQ,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;I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AM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,QAAQ,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;CACrC;AAED,qBAAa,MAAM;IAKH,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAe;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAa;gBAElC,MAAM,EAAE,iBAAiB;IAiBtD,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,MAAM,CAAC,OAAO,EAAE,YAAY;IAa5B,YAAY,CAAC,OAAO,EAAE,YAAY;IA4BlC,KAAK;IAKZ,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,aAAa;IA8BrB;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IA2CjB,OAAO,CAAC,YAAY;IAkBb,UAAU;;;;CAMpB"}
@@ -150,7 +150,6 @@ class Outbox {
150
150
  this.params.pendingStateManager.onSubmitMessage(message.deserializedContent.type, clientSequenceNumber, message.referenceSequenceNumber, message.deserializedContent.contents, message.localOpMetadata, message.metadata);
151
151
  clientSequenceNumber++;
152
152
  }
153
- this.params.pendingStateManager.onFlush();
154
153
  }
155
154
  checkpoint() {
156
155
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"outbox.js","sourceRoot":"","sources":["../../src/opLifecycle/outbox.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAAsD;AAEtD,qEAA+D;AAC/D,+EAAmE;AAGnE,iDAA8C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AA4C,CAAC,CAAC;QACtF,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAEO,YAAY,CAAC,2BAAmC,EAAE,KAAqB;QAC3E,IAAI,oBAAoB,GAAG,2BAA2B,CAAC;QACvD,iEAAiE;QACjE,4DAA4D;QAC5D,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE;YACzB,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAC3C,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAChC,oBAAoB,EACpB,OAAO,CAAC,uBAAuB,EAC/B,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EACpC,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,QAAQ,CACnB,CAAC;YAEF,oBAAoB,EAAE,CAAC;SAC1B;QAED,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;IAC9C,CAAC;IAEM,UAAU;QACb,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;YACtC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;SACrD,CAAC;IACN,CAAC;CACJ;AAzLD,wBAyLC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport { GenericError } from \"@fluidframework/container-utils\";\nimport { MessageType } from \"@fluidframework/protocol-definitions\";\nimport { ICompressionRuntimeOptions } from \"../containerRuntime\";\nimport { PendingStateManager } from \"../pendingStateManager\";\nimport { BatchManager } from \"./batchManager\";\nimport { BatchMessage, IBatch } from \"./definitions\";\nimport { OpCompressor } from \"./opCompressor\";\nimport { OpSplitter } from \"./opSplitter\";\n\nexport interface IOutboxConfig {\n readonly compressionOptions: ICompressionRuntimeOptions;\n // The maximum size of a batch that we can send over the wire.\n readonly maxBatchSizeInBytes: number;\n readonly enableOpReentryCheck?: boolean;\n};\n\nexport interface IOutboxParameters {\n readonly shouldSend: () => boolean,\n readonly pendingStateManager: PendingStateManager,\n readonly containerContext: IContainerContext,\n readonly config: IOutboxConfig,\n readonly compressor: OpCompressor;\n readonly splitter: OpSplitter;\n readonly logger: ITelemetryLogger;\n}\n\nexport class Outbox {\n private readonly attachFlowBatch: BatchManager;\n private readonly mainBatch: BatchManager;\n private readonly defaultAttachFlowSoftLimitInBytes = 64 * 1024;\n\n constructor(private readonly params: IOutboxParameters) {\n const isCompressionEnabled = this.params.config.compressionOptions.minimumBatchSizeInBytes !== Number.POSITIVE_INFINITY;\n // We need to allow infinite size batches if we enable compression\n const hardLimit = isCompressionEnabled ? Infinity : this.params.config.maxBatchSizeInBytes;\n const softLimit = isCompressionEnabled ? Infinity : this.defaultAttachFlowSoftLimitInBytes;\n\n this.attachFlowBatch = new BatchManager({\n hardLimit,\n softLimit,\n enableOpReentryCheck: params.config.enableOpReentryCheck,\n }, params.logger);\n this.mainBatch = new BatchManager({\n hardLimit,\n enableOpReentryCheck: params.config.enableOpReentryCheck,\n }, params.logger);\n }\n\n public get isEmpty(): boolean {\n return this.attachFlowBatch.length === 0 && this.mainBatch.length === 0;\n }\n\n public submit(message: BatchMessage) {\n if (!this.mainBatch.push(message)) {\n throw new GenericError(\n \"BatchTooLarge\",\n /* error */ undefined,\n {\n opSize: (message.contents?.length) ?? 0,\n count: this.mainBatch.length,\n limit: this.mainBatch.options.hardLimit,\n });\n }\n }\n\n public submitAttach(message: BatchMessage) {\n if (!this.attachFlowBatch.push(message)) {\n // BatchManager has two limits - soft limit & hard limit. Soft limit is only engaged\n // when queue is not empty.\n // Flush queue & retry. Failure on retry would mean - single message is bigger than hard limit\n this.flushInternal(this.attachFlowBatch.popBatch());\n if (!this.attachFlowBatch.push(message)) {\n throw new GenericError(\n \"BatchTooLarge\",\n /* error */ undefined,\n {\n opSize: (message.contents?.length) ?? 0,\n count: this.attachFlowBatch.length,\n limit: this.attachFlowBatch.options.hardLimit,\n });\n }\n }\n\n // If compression is enabled, we will always successfully receive\n // attach ops and compress then send them at the next JS turn, regardless\n // of the overall size of the accumulated ops in the batch.\n // However, it is more efficient to flush these ops faster, preferably\n // after they reach a size which would benefit from compression.\n if (this.attachFlowBatch.contentSizeInBytes >= this.params.config.compressionOptions.minimumBatchSizeInBytes) {\n this.flushInternal(this.attachFlowBatch.popBatch());\n }\n }\n\n public flush() {\n this.flushInternal(this.attachFlowBatch.popBatch());\n this.flushInternal(this.mainBatch.popBatch());\n }\n\n private flushInternal(rawBatch: IBatch) {\n const processedBatch = this.compressBatch(rawBatch);\n const clientSequenceNumber = this.sendBatch(processedBatch);\n\n this.persistBatch(clientSequenceNumber, rawBatch.content);\n }\n\n private compressBatch(batch: IBatch): IBatch {\n if (batch.content.length === 0\n || this.params.config.compressionOptions === undefined\n || this.params.config.compressionOptions.minimumBatchSizeInBytes > batch.contentSizeInBytes) {\n // Nothing to do if the batch is empty or if compression is disabled or if we don't need to compress\n return batch;\n }\n\n const compressedBatch = this.params.compressor.compressBatch(batch);\n if (compressedBatch.contentSizeInBytes <= this.params.config.maxBatchSizeInBytes) {\n // If we don't reach the maximum supported size of a batch, it can safely be sent as is\n return compressedBatch;\n }\n\n if (this.params.splitter.isBatchChunkingEnabled) {\n return this.params.splitter.splitCompressedBatch(compressedBatch);\n }\n\n // If we've reached this point, the runtime would attempt to send a batch larger than the allowed size\n throw new GenericError(\n \"BatchTooLarge\",\n /* error */ undefined,\n {\n opSize: batch.contentSizeInBytes,\n count: batch.content.length,\n limit: this.params.config.maxBatchSizeInBytes,\n compressed: true,\n });\n }\n\n /**\n * Sends the batch object to the container context to be sent over the wire.\n *\n * @param batch - batch to be sent\n * @returns the client sequence number of the last batched op which was sent and\n * -1 if there are no ops or the container cannot send ops.\n */\n private sendBatch(batch: IBatch): number {\n let clientSequenceNumber: number = -1;\n const length = batch.content.length;\n\n // Did we disconnect in the middle of turn-based batch?\n // If so, do nothing, as pending state manager will resubmit it correctly on reconnect.\n if (length === 0 || !this.params.shouldSend()) {\n return clientSequenceNumber;\n }\n\n if (this.params.containerContext.submitBatchFn === undefined) {\n // Legacy path - supporting old loader versions. Can be removed only when LTS moves above\n // version that has support for batches (submitBatchFn)\n for (const message of batch.content) {\n // Legacy path doesn't support compressed payloads and will submit uncompressed payload anyways\n if (message.metadata?.compressed) {\n delete message.metadata.compressed;\n }\n\n clientSequenceNumber = this.params.containerContext.submitFn(\n MessageType.Operation,\n message.deserializedContent,\n true, // batch\n message.metadata);\n }\n\n this.params.containerContext.deltaManager.flush();\n } else {\n // returns clientSequenceNumber of last message in a batch\n clientSequenceNumber = this.params.containerContext.submitBatchFn(\n batch.content.map((message) => ({\n contents: message.contents,\n metadata: message.metadata,\n compression: message.compression,\n })));\n }\n\n // Convert from clientSequenceNumber of last message in the batch to clientSequenceNumber of first message.\n clientSequenceNumber -= length - 1;\n assert(clientSequenceNumber >= 0, 0x3d0 /* clientSequenceNumber can't be negative */);\n return clientSequenceNumber;\n }\n\n private persistBatch(initialClientSequenceNumber: number, batch: BatchMessage[]) {\n let clientSequenceNumber = initialClientSequenceNumber;\n // Let the PendingStateManager know that a message was submitted.\n // In future, need to shift toward keeping batch as a whole!\n for (const message of batch) {\n this.params.pendingStateManager.onSubmitMessage(\n message.deserializedContent.type,\n clientSequenceNumber,\n message.referenceSequenceNumber,\n message.deserializedContent.contents,\n message.localOpMetadata,\n message.metadata,\n );\n\n clientSequenceNumber++;\n }\n\n this.params.pendingStateManager.onFlush();\n }\n\n public checkpoint() {\n return {\n mainBatch: this.mainBatch.checkpoint(),\n attachFlowBatch: this.attachFlowBatch.checkpoint(),\n };\n }\n}\n"]}
1
+ {"version":3,"file":"outbox.js","sourceRoot":"","sources":["../../src/opLifecycle/outbox.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAAsD;AAEtD,qEAA+D;AAC/D,+EAAmE;AAGnE,iDAA8C;AAU7C,CAAC;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AC;QACtF,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAEO,YAAY,CAAC,2BAAmC,EAAE,KAAqB;QAC3E,IAAI,oBAAoB,GAAG,2BAA2B,CAAC;QACvD,iEAAiE;QACjE,4DAA4D;QAC5D,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE;YACzB,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAC3C,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAChC,oBAAoB,EACpB,OAAO,CAAC,uBAAuB,EAC/B,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EACpC,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,QAAQ,CACnB,CAAC;YAEF,oBAAoB,EAAE,CAAC;SAC1B;IACL,CAAC;IAEM,UAAU;QACb,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;YACtC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;SACrD,CAAC;IACN,CAAC;CACJ;AAvLD,wBAuLC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport { GenericError } from \"@fluidframework/container-utils\";\nimport { MessageType } from \"@fluidframework/protocol-definitions\";\nimport { ICompressionRuntimeOptions } from \"../containerRuntime\";\nimport { PendingStateManager } from \"../pendingStateManager\";\nimport { BatchManager } from \"./batchManager\";\nimport { BatchMessage, IBatch } from \"./definitions\";\nimport { OpCompressor } from \"./opCompressor\";\nimport { OpSplitter } from \"./opSplitter\";\n\nexport interface IOutboxConfig {\n readonly compressionOptions: ICompressionRuntimeOptions;\n // The maximum size of a batch that we can send over the wire.\n readonly maxBatchSizeInBytes: number;\n readonly enableOpReentryCheck?: boolean;\n};\n\nexport interface IOutboxParameters {\n readonly shouldSend: () => boolean,\n readonly pendingStateManager: PendingStateManager,\n readonly containerContext: IContainerContext,\n readonly config: IOutboxConfig,\n readonly compressor: OpCompressor;\n readonly splitter: OpSplitter;\n readonly logger: ITelemetryLogger;\n}\n\nexport class Outbox {\n private readonly attachFlowBatch: BatchManager;\n private readonly mainBatch: BatchManager;\n private readonly defaultAttachFlowSoftLimitInBytes = 64 * 1024;\n\n constructor(private readonly params: IOutboxParameters) {\n const isCompressionEnabled = this.params.config.compressionOptions.minimumBatchSizeInBytes !== Number.POSITIVE_INFINITY;\n // We need to allow infinite size batches if we enable compression\n const hardLimit = isCompressionEnabled ? Infinity : this.params.config.maxBatchSizeInBytes;\n const softLimit = isCompressionEnabled ? Infinity : this.defaultAttachFlowSoftLimitInBytes;\n\n this.attachFlowBatch = new BatchManager({\n hardLimit,\n softLimit,\n enableOpReentryCheck: params.config.enableOpReentryCheck,\n }, params.logger);\n this.mainBatch = new BatchManager({\n hardLimit,\n enableOpReentryCheck: params.config.enableOpReentryCheck,\n }, params.logger);\n }\n\n public get isEmpty(): boolean {\n return this.attachFlowBatch.length === 0 && this.mainBatch.length === 0;\n }\n\n public submit(message: BatchMessage) {\n if (!this.mainBatch.push(message)) {\n throw new GenericError(\n \"BatchTooLarge\",\n /* error */ undefined,\n {\n opSize: (message.contents?.length) ?? 0,\n count: this.mainBatch.length,\n limit: this.mainBatch.options.hardLimit,\n });\n }\n }\n\n public submitAttach(message: BatchMessage) {\n if (!this.attachFlowBatch.push(message)) {\n // BatchManager has two limits - soft limit & hard limit. Soft limit is only engaged\n // when queue is not empty.\n // Flush queue & retry. Failure on retry would mean - single message is bigger than hard limit\n this.flushInternal(this.attachFlowBatch.popBatch());\n if (!this.attachFlowBatch.push(message)) {\n throw new GenericError(\n \"BatchTooLarge\",\n /* error */ undefined,\n {\n opSize: (message.contents?.length) ?? 0,\n count: this.attachFlowBatch.length,\n limit: this.attachFlowBatch.options.hardLimit,\n });\n }\n }\n\n // If compression is enabled, we will always successfully receive\n // attach ops and compress then send them at the next JS turn, regardless\n // of the overall size of the accumulated ops in the batch.\n // However, it is more efficient to flush these ops faster, preferably\n // after they reach a size which would benefit from compression.\n if (this.attachFlowBatch.contentSizeInBytes >= this.params.config.compressionOptions.minimumBatchSizeInBytes) {\n this.flushInternal(this.attachFlowBatch.popBatch());\n }\n }\n\n public flush() {\n this.flushInternal(this.attachFlowBatch.popBatch());\n this.flushInternal(this.mainBatch.popBatch());\n }\n\n private flushInternal(rawBatch: IBatch) {\n const processedBatch = this.compressBatch(rawBatch);\n const clientSequenceNumber = this.sendBatch(processedBatch);\n\n this.persistBatch(clientSequenceNumber, rawBatch.content);\n }\n\n private compressBatch(batch: IBatch): IBatch {\n if (batch.content.length === 0\n || this.params.config.compressionOptions === undefined\n || this.params.config.compressionOptions.minimumBatchSizeInBytes > batch.contentSizeInBytes) {\n // Nothing to do if the batch is empty or if compression is disabled or if we don't need to compress\n return batch;\n }\n\n const compressedBatch = this.params.compressor.compressBatch(batch);\n if (compressedBatch.contentSizeInBytes <= this.params.config.maxBatchSizeInBytes) {\n // If we don't reach the maximum supported size of a batch, it can safely be sent as is\n return compressedBatch;\n }\n\n if (this.params.splitter.isBatchChunkingEnabled) {\n return this.params.splitter.splitCompressedBatch(compressedBatch);\n }\n\n // If we've reached this point, the runtime would attempt to send a batch larger than the allowed size\n throw new GenericError(\n \"BatchTooLarge\",\n /* error */ undefined,\n {\n opSize: batch.contentSizeInBytes,\n count: batch.content.length,\n limit: this.params.config.maxBatchSizeInBytes,\n compressed: true,\n });\n }\n\n /**\n * Sends the batch object to the container context to be sent over the wire.\n *\n * @param batch - batch to be sent\n * @returns the client sequence number of the last batched op which was sent and\n * -1 if there are no ops or the container cannot send ops.\n */\n private sendBatch(batch: IBatch): number {\n let clientSequenceNumber: number = -1;\n const length = batch.content.length;\n\n // Did we disconnect in the middle of turn-based batch?\n // If so, do nothing, as pending state manager will resubmit it correctly on reconnect.\n if (length === 0 || !this.params.shouldSend()) {\n return clientSequenceNumber;\n }\n\n if (this.params.containerContext.submitBatchFn === undefined) {\n // Legacy path - supporting old loader versions. Can be removed only when LTS moves above\n // version that has support for batches (submitBatchFn)\n for (const message of batch.content) {\n // Legacy path doesn't support compressed payloads and will submit uncompressed payload anyways\n if (message.metadata?.compressed) {\n delete message.metadata.compressed;\n }\n\n clientSequenceNumber = this.params.containerContext.submitFn(\n MessageType.Operation,\n message.deserializedContent,\n true, // batch\n message.metadata);\n }\n\n this.params.containerContext.deltaManager.flush();\n } else {\n // returns clientSequenceNumber of last message in a batch\n clientSequenceNumber = this.params.containerContext.submitBatchFn(\n batch.content.map((message) => ({\n contents: message.contents,\n metadata: message.metadata,\n compression: message.compression,\n })));\n }\n\n // Convert from clientSequenceNumber of last message in the batch to clientSequenceNumber of first message.\n clientSequenceNumber -= length - 1;\n assert(clientSequenceNumber >= 0, 0x3d0 /* clientSequenceNumber can't be negative */);\n return clientSequenceNumber;\n }\n\n private persistBatch(initialClientSequenceNumber: number, batch: BatchMessage[]) {\n let clientSequenceNumber = initialClientSequenceNumber;\n // Let the PendingStateManager know that a message was submitted.\n // In future, need to shift toward keeping batch as a whole!\n for (const message of batch) {\n this.params.pendingStateManager.onSubmitMessage(\n message.deserializedContent.type,\n clientSequenceNumber,\n message.referenceSequenceNumber,\n message.deserializedContent.contents,\n message.localOpMetadata,\n message.metadata,\n );\n\n clientSequenceNumber++;\n }\n }\n\n public checkpoint() {\n return {\n mainBatch: this.mainBatch.checkpoint(),\n attachFlowBatch: this.attachFlowBatch.checkpoint(),\n };\n }\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-runtime";
8
- export declare const pkgVersion = "2.0.0-internal.2.4.0";
8
+ export declare const pkgVersion = "2.0.0-internal.3.0.1";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/container-runtime";
11
- exports.pkgVersion = "2.0.0-internal.2.4.0";
11
+ exports.pkgVersion = "2.0.0-internal.3.0.1";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.2.4.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.3.0.1\";\n"]}
@@ -22,6 +22,7 @@ export interface IPendingMessage {
22
22
  /**
23
23
  * This represents an explicit flush call and is added to the pending queue when flush is called on the ContainerRuntime
24
24
  * to flush pending messages.
25
+ * @deprecated Use batch metadata on IPendingMessage instead. To be removed in 2.0.0-internal.4.0.0 (AB#2496)
25
26
  */
26
27
  export interface IPendingFlush {
27
28
  type: "flush";
@@ -38,7 +39,6 @@ export interface IRuntimeStateHandler {
38
39
  clientId(): string | undefined;
39
40
  close(error?: ICriticalContainerError): void;
40
41
  applyStashedOp: (type: ContainerMessageType, content: ISequencedDocumentMessage) => Promise<unknown>;
41
- flush(): void;
42
42
  reSubmit(type: ContainerMessageType, content: any, localOpMetadata: unknown, opMetadata: Record<string, unknown> | undefined): void;
43
43
  rollback(type: ContainerMessageType, content: any, localOpMetadata: unknown): void;
44
44
  orderSequentially(callback: () => void): void;
@@ -54,16 +54,15 @@ export interface IRuntimeStateHandler {
54
54
  */
55
55
  export declare class PendingStateManager implements IDisposable {
56
56
  private readonly stateHandler;
57
- private readonly pendingStates;
58
- private readonly initialStates;
57
+ private readonly pendingMessages;
58
+ private readonly initialMessages;
59
59
  private readonly disposeOnce;
60
- private _pendingMessagesCount;
61
60
  get pendingMessagesCount(): number;
62
61
  private isProcessingBatch;
63
62
  private pendingBatchBeginMessage;
64
63
  private clientId;
65
64
  /**
66
- * Called to check if there are any pending messages in the pending state queue.
65
+ * Called to check if there are any pending messages in the pending message queue.
67
66
  * @returns A boolean indicating whether there are messages or not.
68
67
  */
69
68
  hasPendingMessages(): boolean;
@@ -80,10 +79,6 @@ export declare class PendingStateManager implements IDisposable {
80
79
  * @param localOpMetadata - The local metadata associated with the message.
81
80
  */
82
81
  onSubmitMessage(type: ContainerMessageType, clientSequenceNumber: number, referenceSequenceNumber: number, content: any, localOpMetadata: unknown, opMetadata: Record<string, unknown> | undefined): void;
83
- /**
84
- * Called when flush() is called on the ContainerRuntime to manually flush messages.
85
- */
86
- onFlush(): void;
87
82
  /**
88
83
  * Applies stashed ops at their reference sequence number so they are ready to be ACKed or resubmitted
89
84
  * @param seqNum - Sequence number at which to apply ops. Will apply all ops if seqNum is undefined.
@@ -105,10 +100,6 @@ export declare class PendingStateManager implements IDisposable {
105
100
  * @param message - The message that is being processed.
106
101
  */
107
102
  private maybeProcessBatchEnd;
108
- /**
109
- * Returns the next pending state from the pending state queue.
110
- */
111
- private peekNextPendingState;
112
103
  /**
113
104
  * Called when the Container's connection state changes. If the Container gets connected, it replays all the pending
114
105
  * states in its queue. This includes triggering resubmission of unacked ops.
@@ -1 +1 @@
1
- {"version":3,"file":"pendingStateManager.d.ts","sourceRoot":"","sources":["../src/pendingStateManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EACH,yBAAyB,EAC5B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG1D;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,oBAAoB,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAChC,OAAO,EAAE,GAAG,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,OAAO,CAAC;CACjB;AAED,oBAAY,aAAa,GAAG,eAAe,GAAG,aAAa,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,aAAa,EAAE,aAAa,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACjC,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,KAAK,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrG,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CACJ,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EA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