@fluidframework/container-runtime 2.0.0-internal.2.1.1 → 2.0.0-internal.2.2.0
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.
- package/.eslintrc.js +1 -1
- package/dist/blobManager.d.ts +20 -5
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +57 -15
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +39 -40
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +115 -278
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +21 -3
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +8 -5
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +26 -13
- package/dist/dataStores.js.map +1 -1
- package/dist/garbageCollection.d.ts +15 -17
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js +92 -106
- package/dist/garbageCollection.js.map +1 -1
- package/dist/garbageCollectionConstants.d.ts +19 -0
- package/dist/garbageCollectionConstants.d.ts.map +1 -0
- package/dist/garbageCollectionConstants.js +34 -0
- package/dist/garbageCollectionConstants.js.map +1 -0
- package/dist/gcSweepReadyUsageDetection.js +2 -2
- package/dist/gcSweepReadyUsageDetection.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +30 -0
- package/dist/opLifecycle/batchManager.d.ts.map +1 -0
- package/dist/{batchManager.js → opLifecycle/batchManager.js} +25 -10
- package/dist/opLifecycle/batchManager.js.map +1 -0
- package/dist/opLifecycle/definitions.d.ts +40 -0
- package/dist/opLifecycle/definitions.d.ts.map +1 -0
- package/dist/opLifecycle/definitions.js +7 -0
- package/dist/opLifecycle/definitions.js.map +1 -0
- package/dist/opLifecycle/index.d.ts +12 -0
- package/dist/opLifecycle/index.d.ts.map +1 -0
- package/dist/opLifecycle/index.js +21 -0
- package/dist/opLifecycle/index.js.map +1 -0
- package/dist/opLifecycle/opCompressor.d.ts +18 -0
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -0
- package/dist/opLifecycle/opCompressor.js +53 -0
- package/dist/opLifecycle/opCompressor.js.map +1 -0
- package/dist/opLifecycle/opDecompressor.d.ts +20 -0
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -0
- package/dist/opLifecycle/opDecompressor.js +72 -0
- package/dist/opLifecycle/opDecompressor.js.map +1 -0
- package/dist/opLifecycle/opSplitter.d.ts +17 -0
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -0
- package/dist/opLifecycle/opSplitter.js +61 -0
- package/dist/opLifecycle/opSplitter.js.map +1 -0
- package/dist/opLifecycle/outbox.d.ts +47 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -0
- package/dist/opLifecycle/outbox.js +153 -0
- package/dist/opLifecycle/outbox.js.map +1 -0
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +26 -0
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -0
- package/dist/opLifecycle/remoteMessageProcessor.js +81 -0
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summaryFormat.js +2 -2
- package/dist/summaryFormat.js.map +1 -1
- package/lib/blobManager.d.ts +20 -5
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +59 -17
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +39 -40
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +113 -275
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +23 -5
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +8 -5
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +28 -15
- package/lib/dataStores.js.map +1 -1
- package/lib/garbageCollection.d.ts +15 -17
- package/lib/garbageCollection.d.ts.map +1 -1
- package/lib/garbageCollection.js +72 -86
- package/lib/garbageCollection.js.map +1 -1
- package/lib/garbageCollectionConstants.d.ts +19 -0
- package/lib/garbageCollectionConstants.d.ts.map +1 -0
- package/lib/garbageCollectionConstants.js +31 -0
- package/lib/garbageCollectionConstants.js.map +1 -0
- package/lib/gcSweepReadyUsageDetection.js +1 -1
- package/lib/gcSweepReadyUsageDetection.js.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +30 -0
- package/lib/opLifecycle/batchManager.d.ts.map +1 -0
- package/lib/{batchManager.js → opLifecycle/batchManager.js} +25 -10
- package/lib/opLifecycle/batchManager.js.map +1 -0
- package/lib/opLifecycle/definitions.d.ts +40 -0
- package/lib/opLifecycle/definitions.d.ts.map +1 -0
- package/lib/opLifecycle/definitions.js +6 -0
- package/lib/opLifecycle/definitions.js.map +1 -0
- package/lib/opLifecycle/index.d.ts +12 -0
- package/lib/opLifecycle/index.d.ts.map +1 -0
- package/lib/opLifecycle/index.js +11 -0
- package/lib/opLifecycle/index.js.map +1 -0
- package/lib/opLifecycle/opCompressor.d.ts +18 -0
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -0
- package/lib/opLifecycle/opCompressor.js +49 -0
- package/lib/opLifecycle/opCompressor.js.map +1 -0
- package/lib/opLifecycle/opDecompressor.d.ts +20 -0
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -0
- package/lib/opLifecycle/opDecompressor.js +68 -0
- package/lib/opLifecycle/opDecompressor.js.map +1 -0
- package/lib/opLifecycle/opSplitter.d.ts +17 -0
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -0
- package/lib/opLifecycle/opSplitter.js +57 -0
- package/lib/opLifecycle/opSplitter.js.map +1 -0
- package/lib/opLifecycle/outbox.d.ts +47 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -0
- package/lib/opLifecycle/outbox.js +149 -0
- package/lib/opLifecycle/outbox.js.map +1 -0
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +26 -0
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -0
- package/lib/opLifecycle/remoteMessageProcessor.js +76 -0
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/summaryFormat.js +1 -1
- package/lib/summaryFormat.js.map +1 -1
- package/package.json +35 -21
- package/prettier.config.cjs +8 -0
- package/src/blobManager.ts +74 -19
- package/src/containerRuntime.ts +144 -341
- package/src/dataStoreContext.ts +33 -5
- package/src/dataStores.ts +32 -16
- package/src/garbageCollection.ts +106 -82
- package/src/garbageCollectionConstants.ts +35 -0
- package/src/gcSweepReadyUsageDetection.ts +1 -1
- package/src/index.ts +6 -4
- package/src/{batchManager.ts → opLifecycle/batchManager.ts} +41 -23
- package/src/opLifecycle/definitions.ts +44 -0
- package/src/opLifecycle/index.ts +17 -0
- package/src/opLifecycle/opCompressor.ts +64 -0
- package/src/opLifecycle/opDecompressor.ts +84 -0
- package/src/opLifecycle/opSplitter.ts +78 -0
- package/src/opLifecycle/outbox.ts +204 -0
- package/src/opLifecycle/remoteMessageProcessor.ts +90 -0
- package/src/packageVersion.ts +1 -1
- package/src/summaryFormat.ts +1 -1
- package/dist/batchManager.d.ts +0 -36
- package/dist/batchManager.d.ts.map +0 -1
- package/dist/batchManager.js.map +0 -1
- package/lib/batchManager.d.ts +0 -36
- package/lib/batchManager.d.ts.map +0 -1
- package/lib/batchManager.js.map +0 -1
package/dist/dataStores.js.map
CHANGED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C;SACpB;QAED,sDAAsD;QACtD,qEAAqE;QACrE,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,OAAO,8BAAU,CAAC,SAAS,CAAC;SAC/B;QACD,OAAO,8BAAU,CAAC,YAAY,CAAC;IACnC,CAAC;CACJ;AA/nBD,gCA+nBC;AAED,SAAgB,uBAAuB,CACnC,QAAmC,EACnC,QAAoC;IAEpC,IAAI,CAAC,QAAQ,EAAE;QACX,OAAO,SAAS,CAAC;KACpB;IAED,IAAI,IAAA,uCAAuB,EAAC,QAAQ,CAAC,EAAE;QACnC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,KAAK,CAAC,sCAAgB,CAAC,CAAC;QAC5D,IAAA,qBAAM,EAAC,CAAC,CAAC,kBAAkB,EAAE,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC9E,OAAO,kBAAkB,CAAC;KAC7B;SAAM;QACH,qFAAqF;QACrF,MAAM,eAAe,GAA2B,EAAE,CAAC;QACnD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YACvD,IAAI,CAAC,iCAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAClC,eAAe,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aAChC;SACJ;QACD,uCACO,QAAQ,KACX,KAAK,EAAE,eAAe,IACxB;KACL;AACL,CAAC;AAzBD,0DAyBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger, ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport { DataCorruptionError, extractSafePropertiesFromMessage } from \"@fluidframework/container-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore\";\nimport {\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n AliasResult,\n channelsTreeName,\n CreateChildSummarizerNodeFn,\n CreateChildSummarizerNodeParam,\n CreateSummarizerNodeSource,\n IAttachMessage,\n IEnvelope,\n IFluidDataStoreContextDetached,\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IInboundSignalMessage,\n InboundAttachMessage,\n ISummarizeResult,\n ISummaryTreeWithStats,\n ITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n convertSnapshotTreeToSummaryTree,\n convertToSummaryTree,\n create404Response,\n createResponseError,\n responseToException,\n SummaryTreeBuilder,\n} from \"@fluidframework/runtime-utils\";\nimport { ChildLogger, LoggingError, TelemetryDataTag } from \"@fluidframework/telemetry-utils\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { BlobCacheStorageService, buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport { assert, Lazy, LazyPromise } from \"@fluidframework/common-utils\";\nimport { v4 as uuid } from \"uuid\";\nimport { GCDataBuilder, unpackChildNodesUsedRoutes } from \"@fluidframework/garbage-collector\";\nimport { DataStoreContexts } from \"./dataStoreContexts\";\nimport { ContainerRuntime } from \"./containerRuntime\";\nimport {\n FluidDataStoreContext,\n RemoteFluidDataStoreContext,\n LocalFluidDataStoreContext,\n createAttributesBlob,\n LocalDetachedFluidDataStoreContext,\n} from \"./dataStoreContext\";\nimport { IContainerRuntimeMetadata, nonDataStorePaths, rootHasIsolatedChannels } from \"./summaryFormat\";\nimport { IDataStoreAliasMessage, isDataStoreAliasMessage } from \"./dataStore\";\nimport { GCNodeType } from \"./garbageCollection\";\n\ntype PendingAliasResolve = (success: boolean) => void;\n\n/**\n * This class encapsulates data store handling. Currently it is only used by the container runtime,\n * but eventually could be hosted on any channel once we formalize the channel api boundary.\n */\nexport class DataStores implements IDisposable {\n // Stores tracked by the Domain\n private readonly pendingAttach = new Map<string, IAttachMessage>();\n // 0.24 back-compat attachingBeforeSummary\n public readonly attachOpFiredForDataStore = new Set<string>();\n\n private readonly logger: ITelemetryLogger;\n\n private readonly disposeOnce = new Lazy<void>(() => this.contexts.dispose());\n\n public readonly containerLoadStats: {\n // number of dataStores during loadContainer\n readonly containerLoadDataStoreCount: number;\n // number of unreferenced dataStores during loadContainer\n readonly referencedDataStoreCount: number;\n };\n\n // Stores the ids of new data stores between two GC runs. This is used to notify the garbage collector of new\n // root data stores that are added.\n private dataStoresSinceLastGC: string[] = [];\n // The handle to the container runtime. This is used mainly for GC purposes to represent outbound reference from\n // the container runtime to other nodes.\n private readonly containerRuntimeHandle: IFluidHandle;\n private readonly pendingAliasMap: Map<string, Promise<AliasResult>> = new Map<string, Promise<AliasResult>>();\n\n constructor(\n private readonly baseSnapshot: ISnapshotTree | undefined,\n private readonly runtime: ContainerRuntime,\n private readonly submitAttachFn: (attachContent: any) => void,\n private readonly getCreateChildSummarizerNodeFn:\n (id: string, createParam: CreateChildSummarizerNodeParam) => CreateChildSummarizerNodeFn,\n private readonly deleteChildSummarizerNodeFn: (id: string) => void,\n baseLogger: ITelemetryBaseLogger,\n getBaseGCDetails: () => Promise<Map<string, IGarbageCollectionDetailsBase>>,\n private readonly gcNodeUpdated: (\n nodePath: string, timestampMs: number, packagePath?: readonly string[]) => void,\n private readonly aliasMap: Map<string, string>,\n private readonly contexts: DataStoreContexts = new DataStoreContexts(baseLogger),\n ) {\n this.logger = ChildLogger.create(baseLogger);\n this.containerRuntimeHandle = new FluidObjectHandle(this.runtime, \"/\", this.runtime.IFluidHandleContext);\n\n const baseGCDetailsP = new LazyPromise(async () => {\n return getBaseGCDetails();\n });\n // Returns the base GC details for the data store with the given id.\n const dataStoreBaseGCDetails = async (dataStoreId: string) => {\n const baseGCDetails = await baseGCDetailsP;\n return baseGCDetails.get(dataStoreId);\n };\n\n // Extract stores stored inside the snapshot\n const fluidDataStores = new Map<string, ISnapshotTree>();\n if (baseSnapshot) {\n for (const [key, value] of Object.entries(baseSnapshot.trees)) {\n fluidDataStores.set(key, value);\n }\n }\n\n let unreferencedDataStoreCount = 0;\n // Create a context for each of them\n for (const [key, value] of fluidDataStores) {\n let dataStoreContext: FluidDataStoreContext;\n\n // counting number of unreferenced data stores\n if (value.unreferenced) {\n unreferencedDataStoreCount++;\n }\n // If we have a detached container, then create local data store contexts.\n if (this.runtime.attachState !== AttachState.Detached) {\n dataStoreContext = new RemoteFluidDataStoreContext({\n id: key,\n snapshotTree: value,\n getBaseGCDetails: async () => dataStoreBaseGCDetails(key),\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n key,\n { type: CreateSummarizerNodeSource.FromSummary },\n ),\n });\n } else {\n if (typeof value !== \"object\") {\n throw new LoggingError(\"Snapshot should be there to load from!!\");\n }\n const snapshotTree = value;\n dataStoreContext = new LocalFluidDataStoreContext({\n id: key,\n pkg: undefined,\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n key,\n { type: CreateSummarizerNodeSource.FromSummary },\n ),\n makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(key),\n snapshotTree,\n isRootDataStore: undefined,\n });\n }\n this.contexts.addBoundOrRemoted(dataStoreContext);\n }\n this.containerLoadStats = {\n containerLoadDataStoreCount: fluidDataStores.size,\n referencedDataStoreCount: fluidDataStores.size - unreferencedDataStoreCount,\n };\n }\n\n public get aliases(): ReadonlyMap<string, string> {\n return this.aliasMap;\n }\n\n public get pendingAliases(): Map<string, Promise<AliasResult>> {\n return this.pendingAliasMap;\n }\n\n public async waitIfPendingAlias(maybeAlias: string): Promise<AliasResult> {\n const pendingAliasPromise = this.pendingAliases.get(maybeAlias);\n return pendingAliasPromise === undefined ? \"Success\" : pendingAliasPromise;\n }\n\n public processAttachMessage(message: ISequencedDocumentMessage, local: boolean) {\n const attachMessage = message.contents as InboundAttachMessage;\n\n this.dataStoresSinceLastGC.push(attachMessage.id);\n\n // The local object has already been attached\n if (local) {\n assert(this.pendingAttach.has(attachMessage.id),\n 0x15e /* \"Local object does not have matching attach message id\" */);\n this.contexts.get(attachMessage.id)?.emit(\"attached\");\n this.pendingAttach.delete(attachMessage.id);\n return;\n }\n\n // If a non-local operation then go and create the object, otherwise mark it as officially attached.\n if (this.alreadyProcessed(attachMessage.id)) {\n // TODO: dataStoreId may require a different tag from PackageData #7488\n const error = new DataCorruptionError(\n // pre-0.58 error message: duplicateDataStoreCreatedWithExistingId\n \"Duplicate DataStore created with existing id\",\n {\n ...extractSafePropertiesFromMessage(message),\n dataStoreId: {\n value: attachMessage.id,\n tag: TelemetryDataTag.CodeArtifact,\n },\n },\n );\n throw error;\n }\n\n const flatBlobs = new Map<string, ArrayBufferLike>();\n let snapshotTree: ISnapshotTree | undefined;\n if (attachMessage.snapshot) {\n snapshotTree = buildSnapshotTree(attachMessage.snapshot.entries, flatBlobs);\n }\n\n // Include the type of attach message which is the pkg of the store to be\n // used by RemoteFluidDataStoreContext in case it is not in the snapshot.\n const pkg = [attachMessage.type];\n const remoteFluidDataStoreContext = new RemoteFluidDataStoreContext({\n id: attachMessage.id,\n snapshotTree,\n // New data stores begin with empty GC details since GC hasn't run on them yet.\n getBaseGCDetails: async () => { return {}; },\n runtime: this.runtime,\n storage: new BlobCacheStorageService(this.runtime.storage, flatBlobs),\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n attachMessage.id,\n {\n type: CreateSummarizerNodeSource.FromAttach,\n sequenceNumber: message.sequenceNumber,\n snapshot: attachMessage.snapshot ?? {\n entries: [createAttributesBlob(\n pkg,\n true /* isRootDataStore */,\n )],\n },\n },\n ),\n pkg,\n });\n\n this.contexts.addBoundOrRemoted(remoteFluidDataStoreContext);\n }\n\n public processAliasMessage(\n message: ISequencedDocumentMessage,\n localOpMetadata: unknown,\n local: boolean,\n ): void {\n const aliasMessage = message.contents as IDataStoreAliasMessage;\n if (!isDataStoreAliasMessage(aliasMessage)) {\n throw new DataCorruptionError(\n \"malformedDataStoreAliasMessage\",\n {\n ...extractSafePropertiesFromMessage(message),\n },\n );\n }\n\n const resolve = localOpMetadata as PendingAliasResolve;\n const aliasResult = this.processAliasMessageCore(aliasMessage);\n if (local) {\n resolve(aliasResult);\n }\n }\n\n public processAliasMessageCore(aliasMessage: IDataStoreAliasMessage): boolean {\n if (this.alreadyProcessed(aliasMessage.alias)) {\n return false;\n }\n\n const context = this.contexts.get(aliasMessage.internalId);\n if (context === undefined) {\n this.logger.sendErrorEvent({\n eventName: \"AliasFluidDataStoreNotFound\",\n fluidDataStoreId: aliasMessage.internalId,\n });\n return false;\n }\n\n const handle = new FluidObjectHandle(\n context,\n aliasMessage.internalId,\n this.runtime.IFluidHandleContext,\n );\n this.runtime.addedGCOutboundReference(this.containerRuntimeHandle, handle);\n\n this.aliasMap.set(aliasMessage.alias, context.id);\n context.setInMemoryRoot();\n return true;\n }\n\n private alreadyProcessed(id: string): boolean {\n return this.aliasMap.get(id) !== undefined || this.contexts.get(id) !== undefined;\n }\n\n /**\n * Make the data stores locally visible in the container graph by moving the data store context from unbound to\n * bound list. This data store can now be reached from the root.\n * @param id - The id of the data store context to make visible.\n */\n private makeDataStoreLocallyVisible(id: string): void {\n const localContext = this.contexts.getUnbound(id);\n assert(!!localContext, 0x15f /* \"Could not find unbound context to bind\" */);\n\n /**\n * If the container is not detached, it is globally visible to all clients. This data store should also be\n * globally visible. Move it to attaching state and send an \"attach\" op for it.\n * If the container is detached, this data store will be part of the summary that makes the container attached.\n */\n if (this.runtime.attachState !== AttachState.Detached) {\n localContext.emit(\"attaching\");\n const message = localContext.generateAttachMessage();\n\n this.pendingAttach.set(id, message);\n this.submitAttachFn(message);\n this.attachOpFiredForDataStore.add(id);\n }\n\n this.contexts.bind(id);\n }\n\n public createDetachedDataStoreCore(\n pkg: Readonly<string[]>,\n isRoot: boolean,\n id = uuid()): IFluidDataStoreContextDetached {\n assert(!id.includes(\"/\"), 0x30c /* Id cannot contain slashes */);\n\n const context = new LocalDetachedFluidDataStoreContext({\n id,\n pkg,\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n id,\n { type: CreateSummarizerNodeSource.Local },\n ),\n makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),\n snapshotTree: undefined,\n isRootDataStore: isRoot,\n });\n this.contexts.addUnbound(context);\n return context;\n }\n\n public _createFluidDataStoreContext(pkg: string[], id: string, props?: any) {\n assert(!id.includes(\"/\"), 0x30d /* Id cannot contain slashes */);\n const context = new LocalFluidDataStoreContext({\n id,\n pkg,\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n id,\n { type: CreateSummarizerNodeSource.Local },\n ),\n makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),\n snapshotTree: undefined,\n isRootDataStore: false,\n createProps: props,\n });\n this.contexts.addUnbound(context);\n return context;\n }\n\n public get disposed() { return this.disposeOnce.evaluated; }\n public readonly dispose = () => this.disposeOnce.value;\n\n public resubmitDataStoreOp(content: any, localOpMetadata: unknown) {\n const envelope = content as IEnvelope;\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x160 /* \"There should be a store context for the op\" */);\n context.reSubmit(envelope.contents, localOpMetadata);\n }\n\n public rollbackDataStoreOp(content: any, localOpMetadata: unknown) {\n const envelope = content as IEnvelope;\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x2e8 /* \"There should be a store context for the op\" */);\n context.rollback(envelope.contents, localOpMetadata);\n }\n\n public async applyStashedOp(content: any): Promise<unknown> {\n const envelope = content as IEnvelope;\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x161 /* \"There should be a store context for the op\" */);\n return context.applyStashedOp(envelope.contents);\n }\n\n public async applyStashedAttachOp(message: IAttachMessage) {\n this.pendingAttach.set(message.id, message);\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.processAttachMessage({ contents: message } as ISequencedDocumentMessage, false);\n }\n\n public processFluidDataStoreOp(message: ISequencedDocumentMessage, local: boolean, localMessageMetadata: unknown) {\n const envelope = message.contents as IEnvelope;\n const transformed = { ...message, contents: envelope.contents };\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x162 /* \"There should be a store context for the op\" */);\n context.process(transformed, local, localMessageMetadata);\n\n // Notify that a GC node for the data store changed. This is used to detect if a deleted data store is\n // being used.\n this.gcNodeUpdated(\n `/${envelope.address}`,\n message.timestamp,\n context.isLoaded ? context.packagePath : undefined,\n );\n }\n\n public async getDataStore(id: string, wait: boolean, viaHandle: boolean): Promise<FluidDataStoreContext> {\n const context = await this.contexts.getBoundOrRemoted(id, wait);\n const request = { url: id };\n if (context === undefined) {\n // The requested data store does not exits. Throw a 404 response exception.\n throw responseToException(create404Response(request), request);\n }\n\n if (context.tombstoned) {\n // Note: if a user writes a request to look like it's viaHandle, we will also send this telemetry event\n this.logger.sendErrorEvent({\n eventName: \"TombstonedDataStoreRequested\",\n url: request.url,\n viaHandle,\n });\n // The requested data store is removed by gc. Throw a 404 gc response exception.\n throw responseToException(createResponseError(404, \"Datastore removed by gc\", request), request);\n }\n\n return context;\n }\n\n public processSignal(address: string, message: IInboundSignalMessage, local: boolean) {\n const context = this.contexts.get(address);\n if (!context) {\n // Attach message may not have been processed yet\n assert(!local, 0x163 /* \"Missing datastore for local signal\" */);\n this.logger.sendTelemetryEvent({\n eventName: \"SignalFluidDataStoreNotFound\",\n fluidDataStoreId: {\n value: address,\n tag: TelemetryDataTag.CodeArtifact,\n },\n });\n return;\n }\n\n context.processSignal(message, local);\n }\n\n public setConnectionState(connected: boolean, clientId?: string) {\n for (const [fluidDataStore, context] of this.contexts) {\n try {\n context.setConnectionState(connected, clientId);\n } catch (error) {\n this.logger.sendErrorEvent({\n eventName: \"SetConnectionStateError\",\n clientId,\n fluidDataStore,\n }, error);\n }\n }\n }\n\n public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {\n const eventName = attachState === AttachState.Attaching ? \"attaching\" : \"attached\";\n for (const [, context] of this.contexts) {\n // Fire only for bounded stores.\n if (!this.contexts.isNotBound(context.id)) {\n context.emit(eventName);\n }\n }\n }\n\n public get size(): number {\n return this.contexts.size;\n }\n\n public async summarize(\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats> {\n const summaryBuilder = new SummaryTreeBuilder();\n\n // Iterate over each store and ask it to snapshot\n await Promise.all(Array.from(this.contexts)\n .filter(([_, context]) => {\n // Summarizer works only with clients with no local changes!\n assert(context.attachState !== AttachState.Attaching,\n 0x165 /* \"Summarizer cannot work if client has local changes\" */);\n return context.attachState === AttachState.Attached;\n }).map(async ([contextId, context]) => {\n const contextSummary = await context.summarize(fullTree, trackState, telemetryContext);\n summaryBuilder.addWithStats(contextId, contextSummary);\n }));\n\n return summaryBuilder.getSummaryTree();\n }\n\n public createSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {\n const builder = new SummaryTreeBuilder();\n // Attaching graph of some stores can cause other stores to get bound too.\n // So keep taking summary until no new stores get bound.\n let notBoundContextsLength: number;\n do {\n const builderTree = builder.summary.tree;\n notBoundContextsLength = this.contexts.notBoundLength();\n // Iterate over each data store and ask it to snapshot\n Array.from(this.contexts)\n .filter(([key, _]) =>\n // Take summary of bounded data stores only, make sure we haven't summarized them already\n // and no attach op has been fired for that data store because for loader versions <= 0.24\n // we set attach state as \"attaching\" before taking createNew summary.\n !(this.contexts.isNotBound(key)\n || builderTree[key]\n || this.attachOpFiredForDataStore.has(key)),\n )\n .map(([key, value]) => {\n let dataStoreSummary: ISummarizeResult;\n if (value.isLoaded) {\n const snapshot = value.generateAttachMessage().snapshot;\n dataStoreSummary = convertToSummaryTree(snapshot, true);\n } else {\n // If this data store is not yet loaded, then there should be no changes in the snapshot from\n // which it was created as it is detached container. So just use the previous snapshot.\n assert(!!this.baseSnapshot,\n 0x166 /* \"BaseSnapshot should be there as detached container loaded from snapshot\" */);\n dataStoreSummary = convertSnapshotTreeToSummaryTree(this.baseSnapshot.trees[key]);\n }\n builder.addWithStats(key, dataStoreSummary);\n });\n } while (notBoundContextsLength !== this.contexts.notBoundLength());\n\n return builder.getSummaryTree();\n }\n\n /**\n * Before GC runs, called by the garbage collector to update any pending GC state.\n * The garbage collector needs to know all outbound references that are added. Since root data stores are not\n * explicitly marked as referenced, notify GC of new root data stores that were added since the last GC run.\n */\n public async updateStateBeforeGC(): Promise<void> {\n for (const id of this.dataStoresSinceLastGC) {\n const context = this.contexts.get(id);\n assert(context !== undefined, 0x2b6 /* Missing data store context */);\n if (await context.isRoot()) {\n // A root data store is basically a reference from the container runtime to the data store.\n const handle = new FluidObjectHandle(context, id, this.runtime.IFluidHandleContext);\n this.runtime.addedGCOutboundReference(this.containerRuntimeHandle, handle);\n }\n }\n this.dataStoresSinceLastGC = [];\n }\n\n /**\n * Generates data used for garbage collection. It does the following:\n *\n * 1. Calls into each child data store context to get its GC data.\n *\n * 2. Prefixes the child context's id to the GC nodes in the child's GC data. This makes sure that the node can be\n * identified as belonging to the child.\n *\n * 3. Adds a GC node for this channel to the nodes received from the children. All these nodes together represent\n * the GC data of this channel.\n *\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 const builder = new GCDataBuilder();\n // Iterate over each store and get their GC data.\n await Promise.all(Array.from(this.contexts)\n .filter(([_, context]) => {\n // Get GC data only for attached contexts. Detached contexts are not connected in the GC reference\n // graph so any references they might have won't be connected as well.\n return context.attachState === AttachState.Attached;\n }).map(async ([contextId, context]) => {\n const contextGCData = await context.getGCData(fullGC);\n // Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.\n // This also gradually builds the id of each node to be a path from the root.\n builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);\n }));\n\n // Get the outbound routes and add a GC node for this channel.\n builder.addNode(\"/\", await this.getOutboundRoutes());\n return builder.getGCData();\n }\n\n /**\n * After GC has run, called to notify this Container's data stores of routes that are used in it.\n * @param usedRoutes - The routes that are used in all data stores in this Container.\n */\n public updateUsedRoutes(usedRoutes: string[]) {\n // Get a map of data store ids to routes used in it.\n const usedDataStoreRoutes = unpackChildNodesUsedRoutes(usedRoutes);\n\n // Verify that the used routes are correct.\n for (const [id] of usedDataStoreRoutes) {\n assert(this.contexts.has(id), 0x167 /* \"Used route does not belong to any known data store\" */);\n\n // Revive datastores regardless of whether or not tombstone the tombstone flag is flipped\n const dataStore = this.contexts.get(id);\n assert(dataStore !== undefined, 0x46e /* No data store retrieved with specified id */);\n dataStore.setTombstone(false /* tombstone */);\n }\n\n // Update the used routes in each data store. Used routes is empty for unused data stores.\n for (const [contextId, context] of this.contexts) {\n context.updateUsedRoutes(usedDataStoreRoutes.get(contextId) ?? []);\n }\n }\n\n /**\n * When running GC in test mode, this is called to delete objects whose routes are unused. This enables testing\n * scenarios with accessing deleted content.\n * @param unusedRoutes - The routes that are unused in all data stores in this Container.\n * @param tombstone - set the objects corresponding to routes as tombstones.\n */\n public deleteUnusedRoutes(unusedRoutes: string[], tombstone: boolean = false) {\n for (const route of unusedRoutes) {\n const pathParts = route.split(\"/\");\n // Delete data store only if its route (/datastoreId) is in unusedRoutes. We don't want to delete a data\n // store based on its DDS being unused.\n if (pathParts.length > 2) {\n continue;\n }\n const dataStoreId = pathParts[1];\n assert(this.contexts.has(dataStoreId), 0x2d7 /* No data store with specified id */);\n\n /**\n * When running GC in tombstone mode, datastore contexts are tombstoned. Tombstoned datastore contexts\n * enable testing scenarios with accessing deleted content without actually deleting content from\n * summaries.\n */\n if (tombstone) {\n const dataStore = this.contexts.get(dataStoreId);\n assert(dataStore !== undefined, 0x442 /* No data store retrieved with specified id */);\n dataStore.setTombstone(true /* tombstone */);\n continue;\n }\n\n // Delete the contexts of unused data stores.\n this.contexts.delete(dataStoreId);\n // Delete the summarizer node of the unused data stores.\n this.deleteChildSummarizerNodeFn(dataStoreId);\n }\n }\n\n /**\n * Returns the outbound routes of this channel. Only root data stores are considered referenced and their paths are\n * part of outbound routes.\n */\n private async getOutboundRoutes(): Promise<string[]> {\n const outboundRoutes: string[] = [];\n for (const [contextId, context] of this.contexts) {\n const isRootDataStore = await context.isRoot();\n if (isRootDataStore) {\n outboundRoutes.push(`/${contextId}`);\n }\n }\n return outboundRoutes;\n }\n\n /**\n * Called by GC to retrieve the package path of a data store node with the given path.\n */\n public async getDataStorePackagePath(nodePath: string): Promise<readonly string[] | undefined> {\n // If the node belongs to a data store, return its package path. For DDSes, we return the package path of the\n // data store that contains it.\n const context = this.contexts.get(nodePath.split(\"/\")[1]);\n return (await context?.getInitialSnapshotDetails())?.pkg;\n }\n\n /**\n * Called by GC to determine if a node is for a data store or for an object within a data store (for e.g. DDS).\n * @returns the GC node type if the node belongs to a data store or object within data store, undefined otherwise.\n */\n public getGCNodeType(nodePath: string): GCNodeType | undefined {\n const pathParts = nodePath.split(\"/\");\n if (!this.contexts.has(pathParts[1])) {\n return undefined;\n }\n\n // Data stores paths are of the format \"/dataStoreId\".\n // Sub data store paths are of the format \"/dataStoreId/subPath/...\".\n if (pathParts.length === 2) {\n return GCNodeType.DataStore;\n }\n return GCNodeType.SubDataStore;\n }\n}\n\nexport function getSummaryForDatastores(\n snapshot: ISnapshotTree | undefined,\n metadata?: IContainerRuntimeMetadata,\n): ISnapshotTree | undefined {\n if (!snapshot) {\n return undefined;\n }\n\n if (rootHasIsolatedChannels(metadata)) {\n const datastoresSnapshot = snapshot.trees[channelsTreeName];\n assert(!!datastoresSnapshot, 0x168 /* Expected tree in snapshot not found */);\n return datastoresSnapshot;\n } else {\n // back-compat: strip out all non-datastore paths before giving to DataStores object.\n const datastoresTrees: ISnapshotTree[\"trees\"] = {};\n for (const [key, value] of Object.entries(snapshot.trees)) {\n if (!nonDataStorePaths.includes(key)) {\n datastoresTrees[key] = value;\n }\n }\n return {\n ...snapshot,\n trees: datastoresTrees,\n };\n }\n}\n"]}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CAAC,EAAE;YACvD,IAAI,CAAC,iCAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAClC,eAAe,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aAChC;SACJ;QACD,uCACO,QAAQ,KACX,KAAK,EAAE,eAAe,IACxB;KACL;AACL,CAAC;AAzBD,0DAyBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable } from \"@fluidframework/common-definitions\";\nimport { DataCorruptionError, extractSafePropertiesFromMessage } from \"@fluidframework/container-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore\";\nimport {\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n AliasResult,\n channelsTreeName,\n CreateChildSummarizerNodeFn,\n CreateChildSummarizerNodeParam,\n CreateSummarizerNodeSource,\n IAttachMessage,\n IEnvelope,\n IFluidDataStoreContextDetached,\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IInboundSignalMessage,\n InboundAttachMessage,\n ISummarizeResult,\n ISummaryTreeWithStats,\n ITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n convertSnapshotTreeToSummaryTree,\n convertToSummaryTree,\n create404Response,\n createResponseError,\n responseToException,\n packagePathToTelemetryProperty,\n SummaryTreeBuilder,\n} from \"@fluidframework/runtime-utils\";\nimport { ChildLogger, loggerToMonitoringContext, LoggingError, MonitoringContext, TelemetryDataTag } from \"@fluidframework/telemetry-utils\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { BlobCacheStorageService, buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport { assert, Lazy, LazyPromise } from \"@fluidframework/common-utils\";\nimport { v4 as uuid } from \"uuid\";\nimport { GCDataBuilder, unpackChildNodesUsedRoutes } from \"@fluidframework/garbage-collector\";\nimport { DataStoreContexts } from \"./dataStoreContexts\";\nimport { ContainerRuntime } from \"./containerRuntime\";\nimport {\n FluidDataStoreContext,\n RemoteFluidDataStoreContext,\n LocalFluidDataStoreContext,\n createAttributesBlob,\n LocalDetachedFluidDataStoreContext,\n} from \"./dataStoreContext\";\nimport { IContainerRuntimeMetadata, nonDataStorePaths, rootHasIsolatedChannels } from \"./summaryFormat\";\nimport { IDataStoreAliasMessage, isDataStoreAliasMessage } from \"./dataStore\";\nimport { GCNodeType } from \"./garbageCollection\";\nimport { throwOnTombstoneUsageKey } from \"./garbageCollectionConstants\";\nimport { summarizerClientType } from \"./summarizerClientElection\";\n\ntype PendingAliasResolve = (success: boolean) => void;\n\n/**\n * This class encapsulates data store handling. Currently it is only used by the container runtime,\n * but eventually could be hosted on any channel once we formalize the channel api boundary.\n */\nexport class DataStores implements IDisposable {\n // Stores tracked by the Domain\n private readonly pendingAttach = new Map<string, IAttachMessage>();\n // 0.24 back-compat attachingBeforeSummary\n public readonly attachOpFiredForDataStore = new Set<string>();\n\n private readonly mc: MonitoringContext;\n\n private readonly disposeOnce = new Lazy<void>(() => this.contexts.dispose());\n\n public readonly containerLoadStats: {\n // number of dataStores during loadContainer\n readonly containerLoadDataStoreCount: number;\n // number of unreferenced dataStores during loadContainer\n readonly referencedDataStoreCount: number;\n };\n\n // Stores the ids of new data stores between two GC runs. This is used to notify the garbage collector of new\n // root data stores that are added.\n private dataStoresSinceLastGC: string[] = [];\n /** If true, throw an error when a tombstone data store is retrieved. */\n private readonly throwOnTombstoneUsage: boolean;\n // The handle to the container runtime. This is used mainly for GC purposes to represent outbound reference from\n // the container runtime to other nodes.\n private readonly containerRuntimeHandle: IFluidHandle;\n private readonly pendingAliasMap: Map<string, Promise<AliasResult>> = new Map<string, Promise<AliasResult>>();\n\n constructor(\n private readonly baseSnapshot: ISnapshotTree | undefined,\n private readonly runtime: ContainerRuntime,\n private readonly submitAttachFn: (attachContent: any) => void,\n private readonly getCreateChildSummarizerNodeFn:\n (id: string, createParam: CreateChildSummarizerNodeParam) => CreateChildSummarizerNodeFn,\n private readonly deleteChildSummarizerNodeFn: (id: string) => void,\n baseLogger: ITelemetryBaseLogger,\n getBaseGCDetails: () => Promise<Map<string, IGarbageCollectionDetailsBase>>,\n private readonly gcNodeUpdated: (\n nodePath: string, timestampMs: number, packagePath?: readonly string[]) => void,\n private readonly aliasMap: Map<string, string>,\n private readonly contexts: DataStoreContexts = new DataStoreContexts(baseLogger),\n ) {\n this.mc = loggerToMonitoringContext(ChildLogger.create(baseLogger));\n this.containerRuntimeHandle = new FluidObjectHandle(this.runtime, \"/\", this.runtime.IFluidHandleContext);\n\n const baseGCDetailsP = new LazyPromise(async () => {\n return getBaseGCDetails();\n });\n // Returns the base GC details for the data store with the given id.\n const dataStoreBaseGCDetails = async (dataStoreId: string) => {\n const baseGCDetails = await baseGCDetailsP;\n return baseGCDetails.get(dataStoreId);\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.runtime.clientDetails.type !== summarizerClientType;\n\n // Extract stores stored inside the snapshot\n const fluidDataStores = new Map<string, ISnapshotTree>();\n if (baseSnapshot) {\n for (const [key, value] of Object.entries(baseSnapshot.trees)) {\n fluidDataStores.set(key, value);\n }\n }\n\n let unreferencedDataStoreCount = 0;\n // Create a context for each of them\n for (const [key, value] of fluidDataStores) {\n let dataStoreContext: FluidDataStoreContext;\n\n // counting number of unreferenced data stores\n if (value.unreferenced) {\n unreferencedDataStoreCount++;\n }\n // If we have a detached container, then create local data store contexts.\n if (this.runtime.attachState !== AttachState.Detached) {\n dataStoreContext = new RemoteFluidDataStoreContext({\n id: key,\n snapshotTree: value,\n getBaseGCDetails: async () => dataStoreBaseGCDetails(key),\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n key,\n { type: CreateSummarizerNodeSource.FromSummary },\n ),\n });\n } else {\n if (typeof value !== \"object\") {\n throw new LoggingError(\"Snapshot should be there to load from!!\");\n }\n const snapshotTree = value;\n dataStoreContext = new LocalFluidDataStoreContext({\n id: key,\n pkg: undefined,\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n key,\n { type: CreateSummarizerNodeSource.FromSummary },\n ),\n makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(key),\n snapshotTree,\n isRootDataStore: undefined,\n });\n }\n this.contexts.addBoundOrRemoted(dataStoreContext);\n }\n this.containerLoadStats = {\n containerLoadDataStoreCount: fluidDataStores.size,\n referencedDataStoreCount: fluidDataStores.size - unreferencedDataStoreCount,\n };\n }\n\n public get aliases(): ReadonlyMap<string, string> {\n return this.aliasMap;\n }\n\n public get pendingAliases(): Map<string, Promise<AliasResult>> {\n return this.pendingAliasMap;\n }\n\n public async waitIfPendingAlias(maybeAlias: string): Promise<AliasResult> {\n const pendingAliasPromise = this.pendingAliases.get(maybeAlias);\n return pendingAliasPromise === undefined ? \"Success\" : pendingAliasPromise;\n }\n\n public processAttachMessage(message: ISequencedDocumentMessage, local: boolean) {\n const attachMessage = message.contents as InboundAttachMessage;\n\n this.dataStoresSinceLastGC.push(attachMessage.id);\n\n // The local object has already been attached\n if (local) {\n assert(this.pendingAttach.has(attachMessage.id),\n 0x15e /* \"Local object does not have matching attach message id\" */);\n this.contexts.get(attachMessage.id)?.emit(\"attached\");\n this.pendingAttach.delete(attachMessage.id);\n return;\n }\n\n // If a non-local operation then go and create the object, otherwise mark it as officially attached.\n if (this.alreadyProcessed(attachMessage.id)) {\n // TODO: dataStoreId may require a different tag from PackageData #7488\n const error = new DataCorruptionError(\n // pre-0.58 error message: duplicateDataStoreCreatedWithExistingId\n \"Duplicate DataStore created with existing id\",\n {\n ...extractSafePropertiesFromMessage(message),\n dataStoreId: {\n value: attachMessage.id,\n tag: TelemetryDataTag.CodeArtifact,\n },\n },\n );\n throw error;\n }\n\n const flatBlobs = new Map<string, ArrayBufferLike>();\n let snapshotTree: ISnapshotTree | undefined;\n if (attachMessage.snapshot) {\n snapshotTree = buildSnapshotTree(attachMessage.snapshot.entries, flatBlobs);\n }\n\n // Include the type of attach message which is the pkg of the store to be\n // used by RemoteFluidDataStoreContext in case it is not in the snapshot.\n const pkg = [attachMessage.type];\n const remoteFluidDataStoreContext = new RemoteFluidDataStoreContext({\n id: attachMessage.id,\n snapshotTree,\n // New data stores begin with empty GC details since GC hasn't run on them yet.\n getBaseGCDetails: async () => { return {}; },\n runtime: this.runtime,\n storage: new BlobCacheStorageService(this.runtime.storage, flatBlobs),\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n attachMessage.id,\n {\n type: CreateSummarizerNodeSource.FromAttach,\n sequenceNumber: message.sequenceNumber,\n snapshot: attachMessage.snapshot ?? {\n entries: [createAttributesBlob(\n pkg,\n true /* isRootDataStore */,\n )],\n },\n },\n ),\n pkg,\n });\n\n this.contexts.addBoundOrRemoted(remoteFluidDataStoreContext);\n }\n\n public processAliasMessage(\n message: ISequencedDocumentMessage,\n localOpMetadata: unknown,\n local: boolean,\n ): void {\n const aliasMessage = message.contents as IDataStoreAliasMessage;\n if (!isDataStoreAliasMessage(aliasMessage)) {\n throw new DataCorruptionError(\n \"malformedDataStoreAliasMessage\",\n {\n ...extractSafePropertiesFromMessage(message),\n },\n );\n }\n\n const resolve = localOpMetadata as PendingAliasResolve;\n const aliasResult = this.processAliasMessageCore(aliasMessage);\n if (local) {\n resolve(aliasResult);\n }\n }\n\n public processAliasMessageCore(aliasMessage: IDataStoreAliasMessage): boolean {\n if (this.alreadyProcessed(aliasMessage.alias)) {\n return false;\n }\n\n const context = this.contexts.get(aliasMessage.internalId);\n if (context === undefined) {\n this.mc.logger.sendErrorEvent({\n eventName: \"AliasFluidDataStoreNotFound\",\n fluidDataStoreId: aliasMessage.internalId,\n });\n return false;\n }\n\n const handle = new FluidObjectHandle(\n context,\n aliasMessage.internalId,\n this.runtime.IFluidHandleContext,\n );\n this.runtime.addedGCOutboundReference(this.containerRuntimeHandle, handle);\n\n this.aliasMap.set(aliasMessage.alias, context.id);\n context.setInMemoryRoot();\n return true;\n }\n\n private alreadyProcessed(id: string): boolean {\n return this.aliasMap.get(id) !== undefined || this.contexts.get(id) !== undefined;\n }\n\n /**\n * Make the data stores locally visible in the container graph by moving the data store context from unbound to\n * bound list. This data store can now be reached from the root.\n * @param id - The id of the data store context to make visible.\n */\n private makeDataStoreLocallyVisible(id: string): void {\n const localContext = this.contexts.getUnbound(id);\n assert(!!localContext, 0x15f /* \"Could not find unbound context to bind\" */);\n\n /**\n * If the container is not detached, it is globally visible to all clients. This data store should also be\n * globally visible. Move it to attaching state and send an \"attach\" op for it.\n * If the container is detached, this data store will be part of the summary that makes the container attached.\n */\n if (this.runtime.attachState !== AttachState.Detached) {\n localContext.emit(\"attaching\");\n const message = localContext.generateAttachMessage();\n\n this.pendingAttach.set(id, message);\n this.submitAttachFn(message);\n this.attachOpFiredForDataStore.add(id);\n }\n\n this.contexts.bind(id);\n }\n\n public createDetachedDataStoreCore(\n pkg: Readonly<string[]>,\n isRoot: boolean,\n id = uuid()): IFluidDataStoreContextDetached {\n assert(!id.includes(\"/\"), 0x30c /* Id cannot contain slashes */);\n\n const context = new LocalDetachedFluidDataStoreContext({\n id,\n pkg,\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n id,\n { type: CreateSummarizerNodeSource.Local },\n ),\n makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),\n snapshotTree: undefined,\n isRootDataStore: isRoot,\n });\n this.contexts.addUnbound(context);\n return context;\n }\n\n public _createFluidDataStoreContext(pkg: string[], id: string, props?: any) {\n assert(!id.includes(\"/\"), 0x30d /* Id cannot contain slashes */);\n const context = new LocalFluidDataStoreContext({\n id,\n pkg,\n runtime: this.runtime,\n storage: this.runtime.storage,\n scope: this.runtime.scope,\n createSummarizerNodeFn: this.getCreateChildSummarizerNodeFn(\n id,\n { type: CreateSummarizerNodeSource.Local },\n ),\n makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),\n snapshotTree: undefined,\n isRootDataStore: false,\n createProps: props,\n });\n this.contexts.addUnbound(context);\n return context;\n }\n\n public get disposed() { return this.disposeOnce.evaluated; }\n public readonly dispose = () => this.disposeOnce.value;\n\n public resubmitDataStoreOp(content: any, localOpMetadata: unknown) {\n const envelope = content as IEnvelope;\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x160 /* \"There should be a store context for the op\" */);\n context.reSubmit(envelope.contents, localOpMetadata);\n }\n\n public rollbackDataStoreOp(content: any, localOpMetadata: unknown) {\n const envelope = content as IEnvelope;\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x2e8 /* \"There should be a store context for the op\" */);\n context.rollback(envelope.contents, localOpMetadata);\n }\n\n public async applyStashedOp(content: any): Promise<unknown> {\n const envelope = content as IEnvelope;\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x161 /* \"There should be a store context for the op\" */);\n return context.applyStashedOp(envelope.contents);\n }\n\n public async applyStashedAttachOp(message: IAttachMessage) {\n this.pendingAttach.set(message.id, message);\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.processAttachMessage({ contents: message } as ISequencedDocumentMessage, false);\n }\n\n public processFluidDataStoreOp(message: ISequencedDocumentMessage, local: boolean, localMessageMetadata: unknown) {\n const envelope = message.contents as IEnvelope;\n const transformed = { ...message, contents: envelope.contents };\n const context = this.contexts.get(envelope.address);\n assert(!!context, 0x162 /* \"There should be a store context for the op\" */);\n context.process(transformed, local, localMessageMetadata);\n\n // Notify that a GC node for the data store changed. This is used to detect if a deleted data store is\n // being used.\n this.gcNodeUpdated(\n `/${envelope.address}`,\n message.timestamp,\n context.isLoaded ? context.packagePath : undefined,\n );\n }\n\n public async getDataStore(id: string, wait: boolean, viaHandle: boolean): Promise<FluidDataStoreContext> {\n const context = await this.contexts.getBoundOrRemoted(id, wait);\n const request = { url: id };\n if (context === undefined) {\n // The requested data store does not exits. Throw a 404 response exception.\n throw responseToException(create404Response(request), request);\n }\n\n if (context.tombstoned) {\n // The requested data store is removed by gc. Create a 404 gc response exception.\n const error = responseToException(createResponseError(404, \"Datastore removed by gc\", request), request);\n // Note: if a user writes a request to look like it's viaHandle, we will also send this telemetry event\n this.mc.logger.sendErrorEvent({\n eventName: \"GC_Tombstone_DataStore_Requested\",\n url: request.url,\n pkg: packagePathToTelemetryProperty(context.isLoaded ? context.packagePath : undefined),\n viaHandle,\n }, error);\n // Always log an error when tombstoned data store is used. However, throw an error only if\n // throwOnTombstoneUsage is set.\n if (this.throwOnTombstoneUsage) {\n throw error;\n }\n }\n\n return context;\n }\n\n public processSignal(address: string, message: IInboundSignalMessage, local: boolean) {\n const context = this.contexts.get(address);\n if (!context) {\n // Attach message may not have been processed yet\n assert(!local, 0x163 /* \"Missing datastore for local signal\" */);\n this.mc.logger.sendTelemetryEvent({\n eventName: \"SignalFluidDataStoreNotFound\",\n fluidDataStoreId: {\n value: address,\n tag: TelemetryDataTag.CodeArtifact,\n },\n });\n return;\n }\n\n context.processSignal(message, local);\n }\n\n public setConnectionState(connected: boolean, clientId?: string) {\n for (const [fluidDataStore, context] of this.contexts) {\n try {\n context.setConnectionState(connected, clientId);\n } catch (error) {\n this.mc.logger.sendErrorEvent({\n eventName: \"SetConnectionStateError\",\n clientId,\n fluidDataStore,\n }, error);\n }\n }\n }\n\n public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {\n const eventName = attachState === AttachState.Attaching ? \"attaching\" : \"attached\";\n for (const [, context] of this.contexts) {\n // Fire only for bounded stores.\n if (!this.contexts.isNotBound(context.id)) {\n context.emit(eventName);\n }\n }\n }\n\n public get size(): number {\n return this.contexts.size;\n }\n\n public async summarize(\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats> {\n const summaryBuilder = new SummaryTreeBuilder();\n\n // Iterate over each store and ask it to snapshot\n await Promise.all(Array.from(this.contexts)\n .filter(([_, context]) => {\n // Summarizer works only with clients with no local changes!\n assert(context.attachState !== AttachState.Attaching,\n 0x165 /* \"Summarizer cannot work if client has local changes\" */);\n return context.attachState === AttachState.Attached;\n }).map(async ([contextId, context]) => {\n const contextSummary = await context.summarize(fullTree, trackState, telemetryContext);\n summaryBuilder.addWithStats(contextId, contextSummary);\n }));\n\n return summaryBuilder.getSummaryTree();\n }\n\n public createSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats {\n const builder = new SummaryTreeBuilder();\n // Attaching graph of some stores can cause other stores to get bound too.\n // So keep taking summary until no new stores get bound.\n let notBoundContextsLength: number;\n do {\n const builderTree = builder.summary.tree;\n notBoundContextsLength = this.contexts.notBoundLength();\n // Iterate over each data store and ask it to snapshot\n Array.from(this.contexts)\n .filter(([key, _]) =>\n // Take summary of bounded data stores only, make sure we haven't summarized them already\n // and no attach op has been fired for that data store because for loader versions <= 0.24\n // we set attach state as \"attaching\" before taking createNew summary.\n !(this.contexts.isNotBound(key)\n || builderTree[key]\n || this.attachOpFiredForDataStore.has(key)),\n )\n .map(([key, value]) => {\n let dataStoreSummary: ISummarizeResult;\n if (value.isLoaded) {\n const snapshot = value.generateAttachMessage().snapshot;\n dataStoreSummary = convertToSummaryTree(snapshot, true);\n } else {\n // If this data store is not yet loaded, then there should be no changes in the snapshot from\n // which it was created as it is detached container. So just use the previous snapshot.\n assert(!!this.baseSnapshot,\n 0x166 /* \"BaseSnapshot should be there as detached container loaded from snapshot\" */);\n dataStoreSummary = convertSnapshotTreeToSummaryTree(this.baseSnapshot.trees[key]);\n }\n builder.addWithStats(key, dataStoreSummary);\n });\n } while (notBoundContextsLength !== this.contexts.notBoundLength());\n\n return builder.getSummaryTree();\n }\n\n /**\n * Before GC runs, called by the garbage collector to update any pending GC state.\n * The garbage collector needs to know all outbound references that are added. Since root data stores are not\n * explicitly marked as referenced, notify GC of new root data stores that were added since the last GC run.\n */\n public async updateStateBeforeGC(): Promise<void> {\n for (const id of this.dataStoresSinceLastGC) {\n const context = this.contexts.get(id);\n assert(context !== undefined, 0x2b6 /* Missing data store context */);\n if (await context.isRoot()) {\n // A root data store is basically a reference from the container runtime to the data store.\n const handle = new FluidObjectHandle(context, id, this.runtime.IFluidHandleContext);\n this.runtime.addedGCOutboundReference(this.containerRuntimeHandle, handle);\n }\n }\n this.dataStoresSinceLastGC = [];\n }\n\n /**\n * Generates data used for garbage collection. It does the following:\n *\n * 1. Calls into each child data store context to get its GC data.\n *\n * 2. Prefixes the child context's id to the GC nodes in the child's GC data. This makes sure that the node can be\n * identified as belonging to the child.\n *\n * 3. Adds a GC node for this channel to the nodes received from the children. All these nodes together represent\n * the GC data of this channel.\n *\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 const builder = new GCDataBuilder();\n // Iterate over each store and get their GC data.\n await Promise.all(Array.from(this.contexts)\n .filter(([_, context]) => {\n // Get GC data only for attached contexts. Detached contexts are not connected in the GC reference\n // graph so any references they might have won't be connected as well.\n return context.attachState === AttachState.Attached;\n }).map(async ([contextId, context]) => {\n const contextGCData = await context.getGCData(fullGC);\n // Prefix the child's id to the ids of its GC nodes so they can be identified as belonging to the child.\n // This also gradually builds the id of each node to be a path from the root.\n builder.prefixAndAddNodes(contextId, contextGCData.gcNodes);\n }));\n\n // Get the outbound routes and add a GC node for this channel.\n builder.addNode(\"/\", await this.getOutboundRoutes());\n return builder.getGCData();\n }\n\n /**\n * After GC has run, called to notify this Container's data stores of routes that are used in it.\n * @param usedRoutes - The routes that are used in all data stores in this Container.\n */\n public updateUsedRoutes(usedRoutes: string[]) {\n // Get a map of data store ids to routes used in it.\n const usedDataStoreRoutes = unpackChildNodesUsedRoutes(usedRoutes);\n\n // Verify that the used routes are correct.\n for (const [id] of usedDataStoreRoutes) {\n assert(this.contexts.has(id), 0x167 /* \"Used route does not belong to any known data store\" */);\n\n // Revive datastores regardless of whether or not tombstone the tombstone flag is flipped\n const dataStore = this.contexts.get(id);\n assert(dataStore !== undefined, 0x46e /* No data store retrieved with specified id */);\n dataStore.setTombstone(false /* tombstone */);\n }\n\n // Update the used routes in each data store. Used routes is empty for unused data stores.\n for (const [contextId, context] of this.contexts) {\n context.updateUsedRoutes(usedDataStoreRoutes.get(contextId) ?? []);\n }\n }\n\n /**\n * This is called to update objects whose routes are unused. The unused objects are either deleted or marked as\n * tombstones.\n * @param unusedRoutes - The routes that are unused in all data stores in this Container.\n * @param tombstone - if true, the objects corresponding to unused routes are marked tombstones. Otherwise, they\n * are deleted.\n */\n public updateUnusedRoutes(unusedRoutes: string[], tombstone: boolean) {\n for (const route of unusedRoutes) {\n const pathParts = route.split(\"/\");\n // Delete data store only if its route (/datastoreId) is in unusedRoutes. We don't want to delete a data\n // store based on its DDS being unused.\n if (pathParts.length > 2) {\n continue;\n }\n const dataStoreId = pathParts[1];\n assert(this.contexts.has(dataStoreId), 0x2d7 /* No data store with specified id */);\n\n /**\n * When running GC in tombstone mode, datastore contexts are tombstoned. Tombstoned datastore contexts\n * enable testing scenarios with accessing deleted content without actually deleting content from\n * summaries.\n */\n if (tombstone) {\n const dataStore = this.contexts.get(dataStoreId);\n assert(dataStore !== undefined, 0x442 /* No data store retrieved with specified id */);\n dataStore.setTombstone(true /* tombstone */);\n continue;\n }\n\n // Delete the contexts of unused data stores.\n this.contexts.delete(dataStoreId);\n // Delete the summarizer node of the unused data stores.\n this.deleteChildSummarizerNodeFn(dataStoreId);\n }\n }\n\n /**\n * Returns the outbound routes of this channel. Only root data stores are considered referenced and their paths are\n * part of outbound routes.\n */\n private async getOutboundRoutes(): Promise<string[]> {\n const outboundRoutes: string[] = [];\n for (const [contextId, context] of this.contexts) {\n const isRootDataStore = await context.isRoot();\n if (isRootDataStore) {\n outboundRoutes.push(`/${contextId}`);\n }\n }\n return outboundRoutes;\n }\n\n /**\n * Called by GC to retrieve the package path of a data store node with the given path.\n */\n public async getDataStorePackagePath(nodePath: string): Promise<readonly string[] | undefined> {\n // If the node belongs to a data store, return its package path. For DDSes, we return the package path of the\n // data store that contains it.\n const context = this.contexts.get(nodePath.split(\"/\")[1]);\n return (await context?.getInitialSnapshotDetails())?.pkg;\n }\n\n /**\n * Called by GC to determine if a node is for a data store or for an object within a data store (for e.g. DDS).\n * @returns the GC node type if the node belongs to a data store or object within data store, undefined otherwise.\n */\n public getGCNodeType(nodePath: string): GCNodeType | undefined {\n const pathParts = nodePath.split(\"/\");\n if (!this.contexts.has(pathParts[1])) {\n return undefined;\n }\n\n // Data stores paths are of the format \"/dataStoreId\".\n // Sub data store paths are of the format \"/dataStoreId/subPath/...\".\n if (pathParts.length === 2) {\n return GCNodeType.DataStore;\n }\n return GCNodeType.SubDataStore;\n }\n}\n\nexport function getSummaryForDatastores(\n snapshot: ISnapshotTree | undefined,\n metadata?: IContainerRuntimeMetadata,\n): ISnapshotTree | undefined {\n if (!snapshot) {\n return undefined;\n }\n\n if (rootHasIsolatedChannels(metadata)) {\n const datastoresSnapshot = snapshot.trees[channelsTreeName];\n assert(!!datastoresSnapshot, 0x168 /* Expected tree in snapshot not found */);\n return datastoresSnapshot;\n } else {\n // back-compat: strip out all non-datastore paths before giving to DataStores object.\n const datastoresTrees: ISnapshotTree[\"trees\"] = {};\n for (const [key, value] of Object.entries(snapshot.trees)) {\n if (!nonDataStorePaths.includes(key)) {\n datastoresTrees[key] = value;\n }\n }\n return {\n ...snapshot,\n trees: datastoresTrees,\n };\n }\n}\n"]}
|
|
@@ -9,20 +9,7 @@ import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
|
9
9
|
import { IGarbageCollectionData, IGarbageCollectionDetailsBase, ISummarizeResult, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
10
10
|
import { ReadAndParseBlob, RefreshSummaryResult } from "@fluidframework/runtime-utils";
|
|
11
11
|
import { IGCRuntimeOptions } from "./containerRuntime";
|
|
12
|
-
import { IContainerRuntimeMetadata, IGCMetadata } from "./summaryFormat";
|
|
13
|
-
export declare const gcTreeKey = "gc";
|
|
14
|
-
export declare const gcBlobPrefix = "__gc";
|
|
15
|
-
export declare const gcTombstoneBlobKey = "__tombstones";
|
|
16
|
-
export declare const runGCKey = "Fluid.GarbageCollection.RunGC";
|
|
17
|
-
export declare const runSweepKey = "Fluid.GarbageCollection.RunSweep";
|
|
18
|
-
export declare const gcTestModeKey = "Fluid.GarbageCollection.GCTestMode";
|
|
19
|
-
export declare const runSessionExpiryKey = "Fluid.GarbageCollection.RunSessionExpiry";
|
|
20
|
-
export declare const trackGCStateKey = "Fluid.GarbageCollection.TrackGCState";
|
|
21
|
-
export declare const disableSweepLogKey = "Fluid.GarbageCollection.DisableSweepLog";
|
|
22
|
-
export declare const testTombstoneKey = "Fluid.GarbageCollection.Test.Tombstone";
|
|
23
|
-
export declare const oneDayMs: number;
|
|
24
|
-
export declare const defaultInactiveTimeoutMs: number;
|
|
25
|
-
export declare const defaultSessionExpiryDurationMs: number;
|
|
12
|
+
import { IContainerRuntimeMetadata, IGCMetadata, ICreateContainerMetadata } from "./summaryFormat";
|
|
26
13
|
/** The statistics of the system state after a garbage collection run. */
|
|
27
14
|
export interface IGCStats {
|
|
28
15
|
/** The number of nodes in the container. */
|
|
@@ -60,8 +47,8 @@ export interface IGarbageCollectionRuntime {
|
|
|
60
47
|
getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
|
|
61
48
|
/** After GC has run, called to notify the runtime of routes that are used in it. */
|
|
62
49
|
updateUsedRoutes(usedRoutes: string[]): void;
|
|
63
|
-
/** After GC has run, called to
|
|
64
|
-
|
|
50
|
+
/** After GC has run, called to notify the runtime of routes that are unused in it. */
|
|
51
|
+
updateUnusedRoutes(unusedRoutes: string[], tombstone: boolean): void;
|
|
65
52
|
/** Returns a referenced timestamp to be used to track unreferenced nodes. */
|
|
66
53
|
getCurrentReferenceTimestampMs(): number | undefined;
|
|
67
54
|
/** Returns the type of the GC node. */
|
|
@@ -76,6 +63,8 @@ export interface IGarbageCollector {
|
|
|
76
63
|
/** Tells whether the GC state in summary needs to be reset in the next summary. */
|
|
77
64
|
readonly summaryStateNeedsReset: boolean;
|
|
78
65
|
readonly trackGCState: boolean;
|
|
66
|
+
/** Initialize the state from the base snapshot after its creation. */
|
|
67
|
+
initializeBaseState(): Promise<void>;
|
|
79
68
|
/** Run garbage collection and update the reference / used state of the system. */
|
|
80
69
|
collectGarbage(options: {
|
|
81
70
|
logger?: ITelemetryLogger;
|
|
@@ -104,6 +93,7 @@ export interface IGarbageCollectorCreateParams {
|
|
|
104
93
|
readonly baseLogger: ITelemetryLogger;
|
|
105
94
|
readonly existing: boolean;
|
|
106
95
|
readonly metadata: IContainerRuntimeMetadata | undefined;
|
|
96
|
+
readonly createContainerMetadata: ICreateContainerMetadata;
|
|
107
97
|
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
108
98
|
readonly isSummarizerClient: boolean;
|
|
109
99
|
readonly getNodePackagePath: (nodePath: string) => Promise<readonly string[] | undefined>;
|
|
@@ -238,7 +228,8 @@ export declare class GarbageCollector implements IGarbageCollector {
|
|
|
238
228
|
* Keeps track of the GC data from the last summary submitted to the server but not yet acked.
|
|
239
229
|
*/
|
|
240
230
|
private pendingSummaryData;
|
|
241
|
-
private readonly
|
|
231
|
+
private readonly baseSnapshotDataP;
|
|
232
|
+
private readonly initializeGCStateFromBaseSnapshotP;
|
|
242
233
|
private readonly baseGCDetailsP;
|
|
243
234
|
private readonly unreferencedNodesState;
|
|
244
235
|
private sessionExpiryTimer;
|
|
@@ -246,6 +237,7 @@ export declare class GarbageCollector implements IGarbageCollector {
|
|
|
246
237
|
private pendingEventsQueue;
|
|
247
238
|
private completedRuns;
|
|
248
239
|
private readonly runtime;
|
|
240
|
+
private readonly createContainerMetadata;
|
|
249
241
|
private readonly gcOptions;
|
|
250
242
|
private readonly isSummarizerClient;
|
|
251
243
|
/** The time in ms to expire a session for a client for gc. */
|
|
@@ -265,6 +257,12 @@ export declare class GarbageCollector implements IGarbageCollector {
|
|
|
265
257
|
/** Handler to respond to when a SweepReady object is used */
|
|
266
258
|
private readonly sweepReadyUsageHandler;
|
|
267
259
|
protected constructor(createParams: IGarbageCollectorCreateParams);
|
|
260
|
+
/**
|
|
261
|
+
* Called during container initialization. Initialize the tombstone state so that object are marked as tombstones
|
|
262
|
+
* before they are loaded or used. This is important to get accurate information of whether tombstoned object are
|
|
263
|
+
* in use or not.
|
|
264
|
+
*/
|
|
265
|
+
initializeBaseState(): Promise<void>;
|
|
268
266
|
/**
|
|
269
267
|
* Called when the connection state of the runtime changes, i.e., it connects or disconnects. GC subscribes to this
|
|
270
268
|
* to initialize the base state for non-summarizer clients so that they can track inactive / sweep ready nodes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollection.d.ts","sourceRoot":"","sources":["../src/garbageCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAA8B,MAAM,oCAAoC,CAAC;AAElG,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AASjE,OAAO,EAAE,aAAa,EAAe,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAEH,sBAAsB,EAEtB,6BAA6B,EAC7B,gBAAgB,EAChB,iBAAiB,EAGpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"garbageCollection.d.ts","sourceRoot":"","sources":["../src/garbageCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAA8B,MAAM,oCAAoC,CAAC;AAElG,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AASjE,OAAO,EAAE,aAA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