@fluidframework/container-runtime 0.56.3 → 0.57.0-51086
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/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +9 -1
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +6 -6
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +65 -24
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +139 -72
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +62 -0
- package/dist/dataStore.d.ts.map +1 -0
- package/dist/dataStore.js +135 -0
- package/dist/dataStore.js.map +1 -0
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +9 -5
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +14 -19
- package/dist/dataStores.js.map +1 -1
- package/dist/garbageCollection.d.ts +47 -21
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js +195 -61
- package/dist/garbageCollection.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/runningSummarizer.d.ts +1 -0
- package/dist/runningSummarizer.d.ts.map +1 -1
- package/dist/runningSummarizer.js +23 -15
- package/dist/runningSummarizer.js.map +1 -1
- package/dist/summarizerTypes.d.ts +4 -6
- package/dist/summarizerTypes.d.ts.map +1 -1
- package/dist/summarizerTypes.js.map +1 -1
- package/dist/summaryGenerator.d.ts +2 -1
- package/dist/summaryGenerator.d.ts.map +1 -1
- package/dist/summaryGenerator.js +46 -29
- package/dist/summaryGenerator.js.map +1 -1
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +9 -1
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +6 -6
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +65 -24
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +140 -73
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +62 -0
- package/lib/dataStore.d.ts.map +1 -0
- package/lib/dataStore.js +130 -0
- package/lib/dataStore.js.map +1 -0
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +9 -5
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +13 -18
- package/lib/dataStores.js.map +1 -1
- package/lib/garbageCollection.d.ts +47 -21
- package/lib/garbageCollection.d.ts.map +1 -1
- package/lib/garbageCollection.js +197 -63
- package/lib/garbageCollection.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/runningSummarizer.d.ts +1 -0
- package/lib/runningSummarizer.d.ts.map +1 -1
- package/lib/runningSummarizer.js +23 -15
- package/lib/runningSummarizer.js.map +1 -1
- package/lib/summarizerTypes.d.ts +4 -6
- package/lib/summarizerTypes.d.ts.map +1 -1
- package/lib/summarizerTypes.js.map +1 -1
- package/lib/summaryGenerator.d.ts +2 -1
- package/lib/summaryGenerator.d.ts.map +1 -1
- package/lib/summaryGenerator.js +46 -29
- package/lib/summaryGenerator.js.map +1 -1
- package/package.json +13 -13
- package/src/blobManager.ts +12 -1
- package/src/connectionTelemetry.ts +7 -6
- package/src/containerRuntime.ts +220 -93
- package/src/dataStore.ts +187 -0
- package/src/dataStoreContext.ts +1 -1
- package/src/dataStores.ts +18 -38
- package/src/garbageCollection.ts +283 -105
- package/src/index.ts +3 -1
- package/src/packageVersion.ts +1 -1
- package/src/runningSummarizer.ts +25 -16
- package/src/summarizerTypes.ts +4 -8
- package/src/summaryGenerator.ts +71 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../src/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,KAAK,EAAc,MAAM,sCAAsC,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF;;;;;;GAMG;AACH,qBAAa,UAAW,YAAW,YAAY,CAAC,eAAe,CAAC;aAYxC,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAC1C,GAAG,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC;IAblC,OAAO,CAAC,QAAQ,CAAkB;IAElC,IAAW,YAAY,IAAI,YAAY,CAAiB;IAExD,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,SAAgB,YAAY,EAAE,MAAM,CAAC;gBAGjB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB,EAC1C,GAAG,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC;IAK3B,WAAW;IAIX,IAAI,CAAC,MAAM,EAAE,YAAY;CAGnC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACtC;AAED,qBAAa,WAAW;IAchB,OAAO,CAAC,QAAQ,CAAC,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GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAsB/D,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAmC/E,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAOzD;;OAEG;WACiB,IAAI,CACpB,SAAS,EAAE,aAAa,GAAG,SAAS,EACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAC1D,OAAO,CAAC,oBAAoB,CAAC;IAchC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAI;IAeL,QAAQ,IAAI,KAAK;IAejB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;CAWrD"}
|
package/dist/blobManager.js
CHANGED
|
@@ -64,7 +64,15 @@ class BlobManager {
|
|
|
64
64
|
var _a, _b;
|
|
65
65
|
const storageId = (_b = (_a = this.redirectTable) === null || _a === void 0 ? void 0 : _a.get(blobId)) !== null && _b !== void 0 ? _b : blobId;
|
|
66
66
|
common_utils_1.assert(this.hasBlob(storageId), 0x11f /* "requesting unknown blobs" */);
|
|
67
|
-
return new BlobHandle(`${BlobManager.basePath}/${storageId}`, this.routeContext, async () =>
|
|
67
|
+
return new BlobHandle(`${BlobManager.basePath}/${storageId}`, this.routeContext, async () => {
|
|
68
|
+
return this.getStorage().readBlob(storageId).catch((error) => {
|
|
69
|
+
this.logger.sendErrorEvent({
|
|
70
|
+
eventName: "AttachmentReadBlobError",
|
|
71
|
+
id: storageId,
|
|
72
|
+
}, error);
|
|
73
|
+
throw error;
|
|
74
|
+
});
|
|
75
|
+
});
|
|
68
76
|
}
|
|
69
77
|
async createBlob(blob) {
|
|
70
78
|
var _a, _b;
|
package/dist/blobManager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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EAAE,OAAO,EAAE,CAAC;IACvB,CAAC;IAEM,gBAAgB,CAAC,KAA0B;QAC9C,qBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,KAAK,mCAAW,CAAC,QAAQ,EACpD,KAAK,CAAC,4DAA4D,CAAC,CAAC;QACxE,qBAAM,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzE,KAAK,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,KAAK,EAAE;YACtC,qBAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,yCAAyC,CAAC,CAAC;YAC9F,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;SAC/B;QACD,qBAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,EAAE,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACjG,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;;AAhKL,kCAiKC;AAhK0B,oBAAQ,GAAG,QAAQ,CAAC;AACnB,iCAAqB,GAAG,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle, IFluidHandleContext } from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { AttachmentTreeEntry, BlobTreeEntry } from \"@fluidframework/protocol-base\";\nimport { ISnapshotTree, ITree, ITreeEntry } from \"@fluidframework/protocol-definitions\";\nimport { generateHandleContextPath } from \"@fluidframework/runtime-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { assert, Deferred } from \"@fluidframework/common-utils\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\n\n/**\n * This class represents blob (long string)\n * This object is used only when creating (writing) new blob and serialization purposes.\n * De-serialization process goes through FluidObjectHandle and request flow:\n * DataObject.request() recognizes requests in the form of `/blobs/<id>`\n * and loads blob.\n */\nexport class BlobHandle implements IFluidHandle<ArrayBufferLike> {\n private attached: boolean = false;\n\n public get IFluidHandle(): IFluidHandle { return this; }\n\n public get isAttached(): boolean {\n return this.attached;\n }\n\n public readonly absolutePath: string;\n\n constructor(\n public readonly path: string,\n public readonly routeContext: IFluidHandleContext,\n public get: () => Promise<any>,\n ) {\n this.absolutePath = generateHandleContextPath(path, this.routeContext);\n }\n\n public attachGraph() {\n this.attached = true;\n }\n\n public bind(handle: IFluidHandle) {\n throw new Error(\"Cannot bind to blob handle\");\n }\n}\n\n/**\n * Information from a snapshot needed to load BlobManager\n */\nexport interface IBlobManagerLoadInfo {\n ids?: string[],\n redirectTable?: [string, string][],\n}\n\nexport class BlobManager {\n public static readonly basePath = \"_blobs\";\n private static readonly redirectTableBlobName = \".redirectTable\";\n // uploaded blob IDs\n private readonly blobIds: Set<string> = new Set();\n // blobs for which upload is pending. maps to a promise that will resolve once the blob has been uploaded and a\n // BlobAttach op has round-tripped.\n private readonly pendingBlobIds: Map<string, Deferred<void>> = new Map();\n // blobs uploaded while detached; cleared upon attach\n private readonly detachedBlobIds: Set<string> = new Set();\n // map of detached blob IDs to IDs used by storage. used to support blob handles given out while detached\n private redirectTable: Map<string, string> | undefined;\n\n constructor(\n private readonly routeContext: IFluidHandleContext,\n snapshot: IBlobManagerLoadInfo,\n private readonly getStorage: () => IDocumentStorageService,\n private readonly attachBlobCallback: (blobId: string) => void,\n private readonly runtime: IContainerRuntime,\n private readonly logger: ITelemetryLogger,\n ) {\n this.runtime.once(\"dispose\", () => {\n for (const promise of this.pendingBlobIds.values()) {\n promise.reject(new Error(\"runtime disposed while blobAttach op in flight\"));\n }\n });\n this.load(snapshot);\n }\n\n private hasBlob(id: string): boolean {\n return this.blobIds.has(id) || this.detachedBlobIds.has(id);\n }\n\n public async getBlob(blobId: string): Promise<IFluidHandle<ArrayBufferLike>> {\n const storageId = this.redirectTable?.get(blobId) ?? blobId;\n assert(this.hasBlob(storageId), 0x11f /* \"requesting unknown blobs\" */);\n\n return new BlobHandle(\n `${BlobManager.basePath}/${storageId}`,\n this.routeContext,\n async () => this.getStorage().readBlob(storageId),\n );\n }\n\n public async createBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>> {\n if (this.runtime.attachState === AttachState.Attaching) {\n // blob upload is not supported in \"Attaching\" state\n this.logger.sendTelemetryEvent({ eventName: \"CreateBlobWhileAttaching\" });\n await new Promise<void>((resolve) => this.runtime.once(\"attached\", resolve));\n }\n\n const response = await this.getStorage().createBlob(blob);\n const handle = new BlobHandle(\n `${BlobManager.basePath}/${response.id}`,\n this.routeContext,\n // get() should go through BlobManager.getBlob() so handles created while detached can be redirected\n // to the correct storage id after they are uploaded\n async () => this.getBlob(response.id).then(async (h) => h.get()),\n );\n\n if (this.runtime.attachState === AttachState.Detached) {\n this.detachedBlobIds.add(response.id);\n return handle;\n }\n\n // Note - server will de-dup blobs, so we might get existing blobId!\n if (this.pendingBlobIds.has(response.id)) {\n await this.pendingBlobIds.get(response.id)?.promise;\n } else if (!this.blobIds.has(response.id)) {\n this.pendingBlobIds.set(response.id, new Deferred<void>());\n\n // send blob attach op and wait until we see it to return the handle\n this.attachBlobCallback(response.id);\n await this.pendingBlobIds.get(response.id)?.promise;\n }\n\n return handle;\n }\n\n public processBlobAttachOp(blobId: string, local: boolean) {\n assert(!local || this.pendingBlobIds.has(blobId), 0x1f8 /* \"local BlobAttach op with no pending blob\" */);\n this.pendingBlobIds.get(blobId)?.resolve();\n this.pendingBlobIds.delete(blobId);\n this.blobIds.add(blobId);\n }\n\n /**\n * Reads blobs needed to load BlobManager from storage.\n */\n public static async load(\n blobsTree: ISnapshotTree | undefined,\n tryFetchBlob: (id: string) => Promise<[string, string][]>,\n ): Promise<IBlobManagerLoadInfo> {\n if (!blobsTree) {\n return {};\n }\n let redirectTable;\n const tableId = blobsTree.blobs[this.redirectTableBlobName];\n if (tableId) {\n redirectTable = await tryFetchBlob(tableId);\n }\n const ids = Object.entries(blobsTree.blobs)\n .filter(([k, _]) => k !== this.redirectTableBlobName).map(([_, v]) => v);\n return { ids, redirectTable };\n }\n\n /**\n * Load a set of previously attached blob IDs from a previous snapshot. Note\n * that BlobManager tracking and reporting attached blobs is a temporary\n * solution since storage expects attached blobs to be reported and any that\n * are not reported as attached may be GCed. In the future attached blob\n * IDs will be collected at summarization time, and runtime will not care\n * about the existence or specific formatting of this tree in returned\n * snapshots.\n *\n * @param blobsTree - Tree containing IDs of previously attached blobs. This\n * corresponds to snapshot() below. We look for the IDs in the blob entries\n * of the tree since the both the r11s and SPO drivers replace the\n * attachment types returned in snapshot() with blobs.\n */\n private load(snapshot: IBlobManagerLoadInfo): void {\n if (snapshot.ids) {\n const detached = this.runtime.attachState === AttachState.Detached;\n snapshot.ids.map((entry) => detached ? this.detachedBlobIds.add(entry) : this.blobIds.add(entry));\n }\n if (snapshot.redirectTable) {\n this.redirectTable = new Map(snapshot.redirectTable);\n }\n this.logger.sendTelemetryEvent({\n eventName: \"AttachmentBlobsLoaded\",\n count: snapshot.ids?.length ?? 0,\n redirectTable: snapshot.redirectTable?.length,\n });\n }\n\n public snapshot(): ITree {\n // If we have a redirect table it means the container is about to transition to \"Attaching\" state, so we need\n // to return an actual snapshot containing all the real storage IDs we know about.\n const attachingOrAttached = !!this.redirectTable || this.runtime.attachState !== AttachState.Detached;\n const blobIds = attachingOrAttached ? this.blobIds : this.detachedBlobIds;\n const entries: ITreeEntry[] = [...blobIds].map((id) => new AttachmentTreeEntry(id, id));\n if (this.redirectTable && this.redirectTable.size > 0) {\n entries.push(new BlobTreeEntry(\n BlobManager.redirectTableBlobName,\n JSON.stringify(Array.from(this.redirectTable.entries()))),\n );\n }\n return { entries };\n }\n\n public setRedirectTable(table: Map<string, string>) {\n assert(this.runtime.attachState === AttachState.Detached,\n 0x252 /* \"redirect table can only be set in detached container\" */);\n assert(!this.redirectTable, 0x253 /* \"redirect table already exists\" */);\n for (const [localId, storageId] of table) {\n assert(this.detachedBlobIds.delete(localId), 0x254 /* \"unrecognized id in redirect table\" */);\n this.blobIds.add(storageId);\n }\n assert(this.detachedBlobIds.size === 0, 0x255 /* \"detached blob id absent in redirect table\" */);\n this.redirectTable = table;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"blobManager.js","sourceRoot":"","sources":["../src/blobManager.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,iEAAmF;AAEnF,iEAA0E;AAE1E,+DAAgE;AAEhE,iFAAoE;AAEpE;;;;;;GAMG;AACH,MAAa,UAAU;IAWnB,YACoB,IAAY,EACZ,YAAiC,EAC1C,GAAuB;QAFd,SAAI,GAAJ,IAAI,CAAQ;QACZ,iBAAY,GAAZ,YAAY,CAAqB;QAC1C,QAAG,GAAH,GAAG,CAAoB;QAb1B,aAAQ,GAAY,KAAK,CAAC;QAe9B,IAAI,CAAC,YAAY,GAAG,yCAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3E,CAAC;IAdD,IAAW,YAAY,KAAmB,OAAO,IAAI,CAAC,CAAC,CAAC;IAExD,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAYM,WAAW;QACd,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAEM,IAAI,CAAC,MAAoB;QAC5B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAClD,CAAC;CACJ;AA1BD,gCA0BC;AAUD,MAAa,WAAW;IAapB,YACqB,YAAiC,EAClD,QAA8B,EACb,UAAyC,EACzC,kBAA4C,EAC5C,OAA0B,EAC1B,MAAwB;QALxB,iBAAY,GAAZ,YAAY,CAAqB;QAEjC,eAAU,GAAV,UAAU,CAA+B;QACzC,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,YAAO,GAAP,O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Content":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle, IFluidHandleContext } from \"@fluidframework/core-interfaces\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport { AttachmentTreeEntry, BlobTreeEntry } from \"@fluidframework/protocol-base\";\nimport { ISnapshotTree, ITree, ITreeEntry } from \"@fluidframework/protocol-definitions\";\nimport { generateHandleContextPath } from \"@fluidframework/runtime-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { assert, Deferred } from \"@fluidframework/common-utils\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\n\n/**\n * This class represents blob (long string)\n * This object is used only when creating (writing) new blob and serialization purposes.\n * De-serialization process goes through FluidObjectHandle and request flow:\n * DataObject.request() recognizes requests in the form of `/blobs/<id>`\n * and loads blob.\n */\nexport class BlobHandle implements IFluidHandle<ArrayBufferLike> {\n private attached: boolean = false;\n\n public get IFluidHandle(): IFluidHandle { return this; }\n\n public get isAttached(): boolean {\n return this.attached;\n }\n\n public readonly absolutePath: string;\n\n constructor(\n public readonly path: string,\n public readonly routeContext: IFluidHandleContext,\n public get: () => Promise<any>,\n ) {\n this.absolutePath = generateHandleContextPath(path, this.routeContext);\n }\n\n public attachGraph() {\n this.attached = true;\n }\n\n public bind(handle: IFluidHandle) {\n throw new Error(\"Cannot bind to blob handle\");\n }\n}\n\n/**\n * Information from a snapshot needed to load BlobManager\n */\nexport interface IBlobManagerLoadInfo {\n ids?: string[],\n redirectTable?: [string, string][],\n}\n\nexport class BlobManager {\n public static readonly basePath = \"_blobs\";\n private static readonly redirectTableBlobName = \".redirectTable\";\n // uploaded blob IDs\n private readonly blobIds: Set<string> = new Set();\n // blobs for which upload is pending. maps to a promise that will resolve once the blob has been uploaded and a\n // BlobAttach op has round-tripped.\n private readonly pendingBlobIds: Map<string, Deferred<void>> = new Map();\n // blobs uploaded while detached; cleared upon attach\n private readonly detachedBlobIds: Set<string> = new Set();\n // map of detached blob IDs to IDs used by storage. used to support blob handles given out while detached\n private redirectTable: Map<string, string> | undefined;\n\n constructor(\n private readonly routeContext: IFluidHandleContext,\n snapshot: IBlobManagerLoadInfo,\n private readonly getStorage: () => IDocumentStorageService,\n private readonly attachBlobCallback: (blobId: string) => void,\n private readonly runtime: IContainerRuntime,\n private readonly logger: ITelemetryLogger,\n ) {\n this.runtime.once(\"dispose\", () => {\n for (const promise of this.pendingBlobIds.values()) {\n promise.reject(new Error(\"runtime disposed while blobAttach op in flight\"));\n }\n });\n this.load(snapshot);\n }\n\n private hasBlob(id: string): boolean {\n return this.blobIds.has(id) || this.detachedBlobIds.has(id);\n }\n\n public async getBlob(blobId: string): Promise<IFluidHandle<ArrayBufferLike>> {\n const storageId = this.redirectTable?.get(blobId) ?? blobId;\n assert(this.hasBlob(storageId), 0x11f /* \"requesting unknown blobs\" */);\n\n return new BlobHandle(\n `${BlobManager.basePath}/${storageId}`,\n this.routeContext,\n async () => {\n return this.getStorage().readBlob(storageId).catch((error) => {\n this.logger.sendErrorEvent(\n {\n eventName:\"AttachmentReadBlobError\",\n id: storageId,\n },\n error,\n );\n throw error;\n });\n },\n );\n }\n\n public async createBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>> {\n if (this.runtime.attachState === AttachState.Attaching) {\n // blob upload is not supported in \"Attaching\" state\n this.logger.sendTelemetryEvent({ eventName: \"CreateBlobWhileAttaching\" });\n await new Promise<void>((resolve) => this.runtime.once(\"attached\", resolve));\n }\n\n const response = await this.getStorage().createBlob(blob);\n const handle = new BlobHandle(\n `${BlobManager.basePath}/${response.id}`,\n this.routeContext,\n // get() should go through BlobManager.getBlob() so handles created while detached can be redirected\n // to the correct storage id after they are uploaded\n async () => this.getBlob(response.id).then(async (h) => h.get()),\n );\n\n if (this.runtime.attachState === AttachState.Detached) {\n this.detachedBlobIds.add(response.id);\n return handle;\n }\n\n // Note - server will de-dup blobs, so we might get existing blobId!\n if (this.pendingBlobIds.has(response.id)) {\n await this.pendingBlobIds.get(response.id)?.promise;\n } else if (!this.blobIds.has(response.id)) {\n this.pendingBlobIds.set(response.id, new Deferred<void>());\n\n // send blob attach op and wait until we see it to return the handle\n this.attachBlobCallback(response.id);\n await this.pendingBlobIds.get(response.id)?.promise;\n }\n\n return handle;\n }\n\n public processBlobAttachOp(blobId: string, local: boolean) {\n assert(!local || this.pendingBlobIds.has(blobId), 0x1f8 /* \"local BlobAttach op with no pending blob\" */);\n this.pendingBlobIds.get(blobId)?.resolve();\n this.pendingBlobIds.delete(blobId);\n this.blobIds.add(blobId);\n }\n\n /**\n * Reads blobs needed to load BlobManager from storage.\n */\n public static async load(\n blobsTree: ISnapshotTree | undefined,\n tryFetchBlob: (id: string) => Promise<[string, string][]>,\n ): Promise<IBlobManagerLoadInfo> {\n if (!blobsTree) {\n return {};\n }\n let redirectTable;\n const tableId = blobsTree.blobs[this.redirectTableBlobName];\n if (tableId) {\n redirectTable = await tryFetchBlob(tableId);\n }\n const ids = Object.entries(blobsTree.blobs)\n .filter(([k, _]) => k !== this.redirectTableBlobName).map(([_, v]) => v);\n return { ids, redirectTable };\n }\n\n /**\n * Load a set of previously attached blob IDs from a previous snapshot. Note\n * that BlobManager tracking and reporting attached blobs is a temporary\n * solution since storage expects attached blobs to be reported and any that\n * are not reported as attached may be GCed. In the future attached blob\n * IDs will be collected at summarization time, and runtime will not care\n * about the existence or specific formatting of this tree in returned\n * snapshots.\n *\n * @param blobsTree - Tree containing IDs of previously attached blobs. This\n * corresponds to snapshot() below. We look for the IDs in the blob entries\n * of the tree since the both the r11s and SPO drivers replace the\n * attachment types returned in snapshot() with blobs.\n */\n private load(snapshot: IBlobManagerLoadInfo): void {\n if (snapshot.ids) {\n const detached = this.runtime.attachState === AttachState.Detached;\n snapshot.ids.map((entry) => detached ? this.detachedBlobIds.add(entry) : this.blobIds.add(entry));\n }\n if (snapshot.redirectTable) {\n this.redirectTable = new Map(snapshot.redirectTable);\n }\n this.logger.sendTelemetryEvent({\n eventName: \"AttachmentBlobsLoaded\",\n count: snapshot.ids?.length ?? 0,\n redirectTable: snapshot.redirectTable?.length,\n });\n }\n\n public snapshot(): ITree {\n // If we have a redirect table it means the container is about to transition to \"Attaching\" state, so we need\n // to return an actual snapshot containing all the real storage IDs we know about.\n const attachingOrAttached = !!this.redirectTable || this.runtime.attachState !== AttachState.Detached;\n const blobIds = attachingOrAttached ? this.blobIds : this.detachedBlobIds;\n const entries: ITreeEntry[] = [...blobIds].map((id) => new AttachmentTreeEntry(id, id));\n if (this.redirectTable && this.redirectTable.size > 0) {\n entries.push(new BlobTreeEntry(\n BlobManager.redirectTableBlobName,\n JSON.stringify(Array.from(this.redirectTable.entries()))),\n );\n }\n return { entries };\n }\n\n public setRedirectTable(table: Map<string, string>) {\n assert(this.runtime.attachState === AttachState.Detached,\n 0x252 /* \"redirect table can only be set in detached container\" */);\n assert(!this.redirectTable, 0x253 /* \"redirect table already exists\" */);\n for (const [localId, storageId] of table) {\n assert(this.detachedBlobIds.delete(localId), 0x254 /* \"unrecognized id in redirect table\" */);\n this.blobIds.add(storageId);\n }\n assert(this.detachedBlobIds.size === 0, 0x255 /* \"detached blob id absent in redirect table\" */);\n this.redirectTable = table;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionTelemetry.d.ts","sourceRoot":"","sources":["../src/connectionTelemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EACH,gBAAgB,EAChB,yBAAyB,EAC5B,MAAM,sCAAsC,CAAC;AAG9C;;GAEG;AACH,eAAO,MAAM,gBAAgB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"connectionTelemetry.d.ts","sourceRoot":"","sources":["../src/connectionTelemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EACH,gBAAgB,EAChB,yBAAyB,EAC5B,MAAM,sCAAsC,CAAC;AAG9C;;GAEG;AACH,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAyJrC,wBAAgB,qBAAqB,CACjC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,YAAY,EAAE,aAAa,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,EACxE,MAAM,EAAE,gBAAgB,QAE3B"}
|
|
@@ -16,7 +16,6 @@ class OpPerfTelemetry {
|
|
|
16
16
|
this.clientId = clientId;
|
|
17
17
|
this.deltaManager = deltaManager;
|
|
18
18
|
this.pongCount = 0;
|
|
19
|
-
this.socketLatency = 0;
|
|
20
19
|
this.firstConnection = true;
|
|
21
20
|
this.bootTime = common_utils_1.performance.now();
|
|
22
21
|
this.connectionStartTime = 0;
|
|
@@ -38,6 +37,7 @@ class OpPerfTelemetry {
|
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
this.deltaManager.on("disconnect", () => {
|
|
40
|
+
this.opSendTimeForLatencyStatisticsForMsnStatistics = undefined;
|
|
41
41
|
this.clientSequenceNumberForLatencyStatistics = undefined;
|
|
42
42
|
this.connectionOpSeqNumber = undefined;
|
|
43
43
|
this.firstConnection = false;
|
|
@@ -73,15 +73,14 @@ class OpPerfTelemetry {
|
|
|
73
73
|
}
|
|
74
74
|
recordPingTime(latency) {
|
|
75
75
|
this.pongCount++;
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
if (this.pongCount ===
|
|
76
|
+
this.pingLatency = latency;
|
|
77
|
+
// logging one in every 100 pongs
|
|
78
|
+
if (this.pongCount === 100) {
|
|
79
79
|
this.logger.sendPerformanceEvent({
|
|
80
80
|
eventName: "DeltaLatency",
|
|
81
|
-
duration:
|
|
81
|
+
duration: latency,
|
|
82
82
|
});
|
|
83
83
|
this.pongCount = 0;
|
|
84
|
-
this.socketLatency = 0;
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
beforeOpSubmit(message) {
|
|
@@ -126,6 +125,7 @@ class OpPerfTelemetry {
|
|
|
126
125
|
referenceSequenceNumber: message.referenceSequenceNumber,
|
|
127
126
|
duration,
|
|
128
127
|
category,
|
|
128
|
+
pingLatency: this.pingLatency,
|
|
129
129
|
});
|
|
130
130
|
this.clientSequenceNumberForLatencyStatistics = undefined;
|
|
131
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionTelemetry.js","sourceRoot":"","sources":["../src/connectionTelemetry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qEAA+E;AAM/E,+DAAmE;AAEnE;;GAEG;AACU,QAAA,gBAAgB,GAAG,IAAI,CAAC;AAErC,MAAM,eAAe;IAmBjB,YACY,QAA4B,EACnB,YAAwE,EACzF,MAAwB;QAFhB,aAAQ,GAAR,QAAQ,CAAoB;QACnB,iBAAY,GAAZ,YAAY,CAA4D;QApBrF,cAAS,GAAW,CAAC,CAAC;QACtB,kBAAa,GAAG,CAAC,CAAC;QASlB,oBAAe,GAAG,IAAI,CAAC;QAEd,aAAQ,GAAG,0BAAW,CAAC,GAAG,EAAE,CAAC;QACtC,wBAAmB,GAAG,CAAC,CAAC;QACxB,QAAG,GAAG,CAAC,CAAC;QAQZ,IAAI,CAAC,MAAM,GAAG,6BAAW,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEnD,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;QACxE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC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Ac;gBACd,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;gBACxD,QAAQ;gBACR,QAAQ;aACX,CAAC,CAAC;YACH,IAAI,CAAC,wCAAwC,GAAG,SAAS,CAAC;SAC7D;IACL,CAAC;CACJ;AAED,SAAgB,qBAAqB,CACjC,QAA4B,EAC5B,YAAwE,EACxE,MAAwB;IACxB,IAAI,eAAe,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC;AALD,sDAKC","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 { ChildLogger, TelemetryLogger } from \"@fluidframework/telemetry-utils\";\nimport { IDeltaManager } from \"@fluidframework/container-definitions\";\nimport {\n IDocumentMessage,\n ISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { assert, performance } from \"@fluidframework/common-utils\";\n\n/**\n * We report various latency-related errors when waiting for op roundtrip takes longer than that amout of time.\n */\nexport const latencyThreshold = 5000;\n\nclass OpPerfTelemetry {\n private pongCount: number = 0;\n private socketLatency = 0;\n\n // Collab window tracking. This is timestamp of %1000 message.\n private opSendTimeForLatencyStatisticsForMsnStatistics: number | undefined;\n\n // To track round trip time for every %1000 client message.\n private opSendTimeForLatencyStatistics: number | undefined;\n private clientSequenceNumberForLatencyStatistics: number | undefined;\n\n private firstConnection = true;\n private connectionOpSeqNumber: number | undefined;\n private readonly bootTime = performance.now();\n private connectionStartTime = 0;\n private gap = 0;\n\n private readonly logger: ITelemetryLogger;\n\n public constructor(\n private clientId: string | undefined,\n private readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n logger: ITelemetryLogger) {\n this.logger = ChildLogger.create(logger, \"OpPerf\");\n\n this.deltaManager.on(\"pong\", (latency) => this.recordPingTime(latency));\n this.deltaManager.on(\"submitOp\", (message) => this.beforeOpSubmit(message));\n\n this.deltaManager.on(\"op\", (message) => this.afterProcessingOp(message));\n\n this.deltaManager.on(\"connect\", (details, opsBehind) => {\n this.clientId = details.clientId;\n if (opsBehind !== undefined) {\n this.connectionOpSeqNumber = this.deltaManager.lastKnownSeqNumber;\n this.gap = opsBehind;\n this.connectionStartTime = performance.now();\n\n // We might be already up-today. If so, report it right away.\n if (this.gap <= 0) {\n this.reportGettingUpToDate();\n }\n }\n });\n this.deltaManager.on(\"disconnect\", () => {\n this.clientSequenceNumberForLatencyStatistics = undefined;\n this.connectionOpSeqNumber = undefined;\n this.firstConnection = false;\n });\n\n this.deltaManager.inbound.on(\"idle\", (count: number, duration: number) => {\n // Do not want to log zero for sure.\n // We are more interested in aggregates, so logging only if we are processing some number of ops\n // Cut-off is arbitrary - can be increased or decreased based on amount of data collected and questions we\n // want to get answered\n // back-compat: Once 0.36 loader version saturates (count & duration args were added there),\n // we can remove typeof check.\n if (typeof count === \"number\" && count >= 100) {\n this.logger.sendPerformanceEvent({\n eventName: \"GetDeltas_OpProcessing\",\n count,\n duration,\n });\n }\n });\n }\n\n private reportGettingUpToDate() {\n this.connectionOpSeqNumber = undefined;\n this.logger.sendPerformanceEvent({\n eventName: \"ConnectionSpeed\",\n duration: performance.now() - this.connectionStartTime,\n ops: this.gap,\n // track time to connect only for first connection.\n timeToConnect: this.firstConnection ?\n TelemetryLogger.formatTick(this.connectionStartTime - this.bootTime) :\n undefined,\n firstConnection: this.firstConnection,\n });\n }\n\n private recordPingTime(latency: number) {\n this.pongCount++;\n this.socketLatency += latency;\n const aggregateCount = 100;\n if (this.pongCount === aggregateCount) {\n this.logger.sendPerformanceEvent({\n eventName: \"DeltaLatency\",\n duration: this.socketLatency / aggregateCount,\n });\n this.pongCount = 0;\n this.socketLatency = 0;\n }\n }\n\n private beforeOpSubmit(message: IDocumentMessage) {\n // start with first client op and measure latency every 500 client ops\n if (this.clientSequenceNumberForLatencyStatistics === undefined && message.clientSequenceNumber % 500 === 1) {\n this.opSendTimeForLatencyStatistics = Date.now();\n this.clientSequenceNumberForLatencyStatistics = message.clientSequenceNumber;\n }\n }\n\n private afterProcessingOp(message: ISequencedDocumentMessage) {\n const sequenceNumber = message.sequenceNumber;\n\n if (sequenceNumber === this.connectionOpSeqNumber) {\n this.reportGettingUpToDate();\n }\n\n // Record collab window max size after every 1000th op.\n if (sequenceNumber % 1000 === 0) {\n if (this.opSendTimeForLatencyStatisticsForMsnStatistics !== undefined) {\n this.logger.sendPerformanceEvent({\n eventName: \"MsnStatistics\",\n sequenceNumber,\n msnDistance: this.deltaManager.lastSequenceNumber - this.deltaManager.minimumSequenceNumber,\n duration: message.timestamp - this.opSendTimeForLatencyStatisticsForMsnStatistics,\n });\n }\n this.opSendTimeForLatencyStatisticsForMsnStatistics = message.timestamp;\n }\n\n if (this.clientId === message.clientId &&\n this.clientSequenceNumberForLatencyStatistics === message.clientSequenceNumber) {\n assert(this.opSendTimeForLatencyStatistics !== undefined,\n 0x120 /* \"Undefined latency statistics (op send time)\" */);\n\n const duration = Date.now() - this.opSendTimeForLatencyStatistics;\n\n // One of the core expectations for Fluid service is to be fast.\n // When it's not the case, we want to learn about it and be able to investigate, so\n // raise awareness.\n // This also helps identify cases where it's due to client behavior (sending too many ops)\n // that results in overwhelming ordering service and thus starting to see long latencies.\n // The threshold could be adjusted, but ideally it stays workload-agnostic, as service\n // performance impacts all workloads relying on service.\n const category = duration > latencyThreshold ? \"error\" : \"performance\";\n\n this.logger.sendPerformanceEvent({\n eventName: \"OpRoundtripTime\",\n sequenceNumber,\n referenceSequenceNumber: message.referenceSequenceNumber,\n duration,\n category,\n });\n this.clientSequenceNumberForLatencyStatistics = undefined;\n }\n }\n}\n\nexport function ReportOpPerfTelemetry(\n clientId: string | undefined,\n deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n logger: ITelemetryLogger) {\n new OpPerfTelemetry(clientId, deltaManager, logger);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"connectionTelemetry.js","sourceRoot":"","sources":["../src/conn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OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,8CAA8C;iBACpF,CAAC,CAAC;aACN;YACD,IAAI,CAAC,8CAA8C,GAAG,OAAO,CAAC,SAAS,CAAC;SAC3E;QAED,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ;YAClC,IAAI,CAAC,wCAAwC,KAAK,OAAO,CAAC,oBAAoB,EAAE;YAChF,qBAAM,CAAC,IAAI,CAAC,8BAA8B,KAAK,SAAS,EACpD,KAAK,CAAC,mDAAmD,CAAC,CAAC;YAE/D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,8BAA8B,CAAC;YAElE,gEAAgE;YAChE,mFAAmF;YACnF,mBAAmB;YACnB,0FAA0F;YAC1F,yFAAyF;YACzF,uFAAuF;YACvF,wDAAwD;YACxD,MAAM,QAAQ,GAAG,QAAQ,GAAG,wBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;YAEvE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC;gBAC7B,SAAS,EAAE,iBAAiB;gBAC5B,cAAc;gBACd,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;gBACxD,QAAQ;gBACR,QAAQ;gBACR,WAAW,EAAE,IAAI,CAAC,WAAW;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,wCAAwC,GAAG,SAAS,CAAC;SAC7D;IACL,CAAC;CACJ;AAED,SAAgB,qBAAqB,CACjC,QAA4B,EAC5B,YAAwE,EACxE,MAAwB;IACxB,IAAI,eAAe,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC;AALD,sDAKC","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 { ChildLogger, TelemetryLogger } from \"@fluidframework/telemetry-utils\";\nimport { IDeltaManager } from \"@fluidframework/container-definitions\";\nimport {\n IDocumentMessage,\n ISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport { assert, performance } from \"@fluidframework/common-utils\";\n\n/**\n * We report various latency-related errors when waiting for op roundtrip takes longer than that amout of time.\n */\nexport const latencyThreshold = 5000;\n\nclass OpPerfTelemetry {\n private pongCount: number = 0;\n private pingLatency: number | undefined;\n\n // Collab window tracking. This is timestamp of %1000 message.\n private opSendTimeForLatencyStatisticsForMsnStatistics: number | undefined;\n\n // To track round trip time for every %1000 client message.\n private opSendTimeForLatencyStatistics: number | undefined;\n private clientSequenceNumberForLatencyStatistics: number | undefined;\n\n private firstConnection = true;\n private connectionOpSeqNumber: number | undefined;\n private readonly bootTime = performance.now();\n private connectionStartTime = 0;\n private gap = 0;\n\n private readonly logger: ITelemetryLogger;\n\n public constructor(\n private clientId: string | undefined,\n private readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n logger: ITelemetryLogger) {\n this.logger = ChildLogger.create(logger, \"OpPerf\");\n\n this.deltaManager.on(\"pong\", (latency) => this.recordPingTime(latency));\n this.deltaManager.on(\"submitOp\", (message) => this.beforeOpSubmit(message));\n\n this.deltaManager.on(\"op\", (message) => this.afterProcessingOp(message));\n\n this.deltaManager.on(\"connect\", (details, opsBehind) => {\n this.clientId = details.clientId;\n if (opsBehind !== undefined) {\n this.connectionOpSeqNumber = this.deltaManager.lastKnownSeqNumber;\n this.gap = opsBehind;\n this.connectionStartTime = performance.now();\n\n // We might be already up-today. If so, report it right away.\n if (this.gap <= 0) {\n this.reportGettingUpToDate();\n }\n }\n });\n this.deltaManager.on(\"disconnect\", () => {\n this.opSendTimeForLatencyStatisticsForMsnStatistics = undefined;\n this.clientSequenceNumberForLatencyStatistics = undefined;\n this.connectionOpSeqNumber = undefined;\n this.firstConnection = false;\n });\n\n this.deltaManager.inbound.on(\"idle\", (count: number, duration: number) => {\n // Do not want to log zero for sure.\n // We are more interested in aggregates, so logging only if we are processing some number of ops\n // Cut-off is arbitrary - can be increased or decreased based on amount of data collected and questions we\n // want to get answered\n // back-compat: Once 0.36 loader version saturates (count & duration args were added there),\n // we can remove typeof check.\n if (typeof count === \"number\" && count >= 100) {\n this.logger.sendPerformanceEvent({\n eventName: \"GetDeltas_OpProcessing\",\n count,\n duration,\n });\n }\n });\n }\n\n private reportGettingUpToDate() {\n this.connectionOpSeqNumber = undefined;\n this.logger.sendPerformanceEvent({\n eventName: \"ConnectionSpeed\",\n duration: performance.now() - this.connectionStartTime,\n ops: this.gap,\n // track time to connect only for first connection.\n timeToConnect: this.firstConnection ?\n TelemetryLogger.formatTick(this.connectionStartTime - this.bootTime) :\n undefined,\n firstConnection: this.firstConnection,\n });\n }\n\n private recordPingTime(latency: number) {\n this.pongCount++;\n this.pingLatency = latency;\n // logging one in every 100 pongs\n if (this.pongCount === 100) {\n this.logger.sendPerformanceEvent({\n eventName: \"DeltaLatency\",\n duration: latency,\n });\n this.pongCount = 0;\n }\n }\n\n private beforeOpSubmit(message: IDocumentMessage) {\n // start with first client op and measure latency every 500 client ops\n if (this.clientSequenceNumberForLatencyStatistics === undefined && message.clientSequenceNumber % 500 === 1) {\n this.opSendTimeForLatencyStatistics = Date.now();\n this.clientSequenceNumberForLatencyStatistics = message.clientSequenceNumber;\n }\n }\n\n private afterProcessingOp(message: ISequencedDocumentMessage) {\n const sequenceNumber = message.sequenceNumber;\n\n if (sequenceNumber === this.connectionOpSeqNumber) {\n this.reportGettingUpToDate();\n }\n\n // Record collab window max size after every 1000th op.\n if (sequenceNumber % 1000 === 0) {\n if (this.opSendTimeForLatencyStatisticsForMsnStatistics !== undefined) {\n this.logger.sendPerformanceEvent({\n eventName: \"MsnStatistics\",\n sequenceNumber,\n msnDistance: this.deltaManager.lastSequenceNumber - this.deltaManager.minimumSequenceNumber,\n duration: message.timestamp - this.opSendTimeForLatencyStatisticsForMsnStatistics,\n });\n }\n this.opSendTimeForLatencyStatisticsForMsnStatistics = message.timestamp;\n }\n\n if (this.clientId === message.clientId &&\n this.clientSequenceNumberForLatencyStatistics === message.clientSequenceNumber) {\n assert(this.opSendTimeForLatencyStatistics !== undefined,\n 0x120 /* \"Undefined latency statistics (op send time)\" */);\n\n const duration = Date.now() - this.opSendTimeForLatencyStatistics;\n\n // One of the core expectations for Fluid service is to be fast.\n // When it's not the case, we want to learn about it and be able to investigate, so\n // raise awareness.\n // This also helps identify cases where it's due to client behavior (sending too many ops)\n // that results in overwhelming ordering service and thus starting to see long latencies.\n // The threshold could be adjusted, but ideally it stays workload-agnostic, as service\n // performance impacts all workloads relying on service.\n const category = duration > latencyThreshold ? \"error\" : \"performance\";\n\n this.logger.sendPerformanceEvent({\n eventName: \"OpRoundtripTime\",\n sequenceNumber,\n referenceSequenceNumber: message.referenceSequenceNumber,\n duration,\n category,\n pingLatency: this.pingLatency,\n });\n this.clientSequenceNumberForLatencyStatistics = undefined;\n }\n }\n}\n\nexport function ReportOpPerfTelemetry(\n clientId: string | undefined,\n deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,\n logger: ITelemetryLogger) {\n new OpPerfTelemetry(clientId, deltaManager, logger);\n}\n"]}
|
|
@@ -10,11 +10,12 @@ import { IAudience, IFluidTokenProvider, IContainerContext, IDeltaManager, IRunt
|
|
|
10
10
|
import { IContainerRuntime, IContainerRuntimeEvents } from "@fluidframework/container-runtime-definitions";
|
|
11
11
|
import { TypedEventEmitter } from "@fluidframework/common-utils";
|
|
12
12
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
13
|
-
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISignalMessage, ISummaryConfiguration, ISummaryTree,
|
|
13
|
+
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISignalMessage, ISummaryConfiguration, ISummaryTree, MessageType } from "@fluidframework/protocol-definitions";
|
|
14
14
|
import { FlushMode, IFluidDataStoreContextDetached, IFluidDataStoreRegistry, IGarbageCollectionData, NamedFluidDataStoreRegistryEntries, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
15
15
|
import { IPendingLocalState } from "./pendingStateManager";
|
|
16
16
|
import { SubmitSummaryResult, ISubmitSummaryOptions, ISummarizer, ISummarizerInternalsProvider, ISummarizerOptions, ISummarizerRuntime } from "./summarizerTypes";
|
|
17
|
-
import { IGarbageCollectionRuntime, IGCStats
|
|
17
|
+
import { IGarbageCollectionRuntime, IGCStats } from "./garbageCollection";
|
|
18
|
+
import { IDataStore } from "./dataStore";
|
|
18
19
|
export declare enum ContainerMessageType {
|
|
19
20
|
FluidDataStoreOp = "component",
|
|
20
21
|
Attach = "attach",
|
|
@@ -97,6 +98,33 @@ export interface IContainerRuntimeOptions {
|
|
|
97
98
|
* 3. "bypass" will skip the check entirely. This is not recommended.
|
|
98
99
|
*/
|
|
99
100
|
loadSequenceNumberVerification?: "close" | "log" | "bypass";
|
|
101
|
+
/**
|
|
102
|
+
* Should the runtime use data store aliasing for creating root datastores.
|
|
103
|
+
* In case of aliasing conflicts, the runtime will raise an exception which does
|
|
104
|
+
* not effect the status of the container.
|
|
105
|
+
*/
|
|
106
|
+
useDataStoreAliasing?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The summary tree returned by the root node. It adds state relevant to the root of the tree.
|
|
110
|
+
*/
|
|
111
|
+
export interface IRootSummaryTreeWithStats extends ISummaryTreeWithStats {
|
|
112
|
+
/** The garbage collection stats if GC ran, undefined otherwise. */
|
|
113
|
+
gcStats?: IGCStats;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Accepted header keys for requests coming to the runtime.
|
|
117
|
+
*/
|
|
118
|
+
export declare enum RuntimeHeaders {
|
|
119
|
+
/** True to wait for a data store to be created and loaded before returning it. */
|
|
120
|
+
wait = "wait",
|
|
121
|
+
/**
|
|
122
|
+
* True if the request is from an external app. Used for GC to handle scenarios where a data store
|
|
123
|
+
* is deleted and requested via an external app.
|
|
124
|
+
*/
|
|
125
|
+
externalRequest = "externalRequest",
|
|
126
|
+
/** True if the request is coming from an IFluidHandle. */
|
|
127
|
+
viaHandle = "viaHandle"
|
|
100
128
|
}
|
|
101
129
|
export declare enum RuntimeMessage {
|
|
102
130
|
FluidDataStoreOp = "component",
|
|
@@ -186,6 +214,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
186
214
|
private readonly summaryManager?;
|
|
187
215
|
private readonly summaryCollection;
|
|
188
216
|
private readonly summarizerNode;
|
|
217
|
+
private readonly _aliasingEnabled;
|
|
189
218
|
private _orderSequentiallyCalls;
|
|
190
219
|
private _flushMode;
|
|
191
220
|
private needsFlush;
|
|
@@ -200,7 +229,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
200
229
|
get disposed(): boolean;
|
|
201
230
|
private dirtyContainer;
|
|
202
231
|
private emitDirtyDocumentEvent;
|
|
203
|
-
private summarizerWarning;
|
|
232
|
+
private readonly summarizerWarning;
|
|
204
233
|
/**
|
|
205
234
|
* Summarizer is responsible for coordinating when to send generate and send summaries.
|
|
206
235
|
* It is the main entry point for summary work.
|
|
@@ -239,21 +268,8 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
239
268
|
* @param request - Request made to the handler.
|
|
240
269
|
*/
|
|
241
270
|
resolveHandle(request: IRequest): Promise<IResponse>;
|
|
271
|
+
private getDataStoreFromRequest;
|
|
242
272
|
private formMetadata;
|
|
243
|
-
/**
|
|
244
|
-
* Retrieves the runtime for a data store if it's referenced as per the initially summary that it is loaded with.
|
|
245
|
-
* This is a workaround to handle scenarios where a data store shared with an external app is deleted and marked
|
|
246
|
-
* as unreferenced by GC.
|
|
247
|
-
* @param id - Id supplied during creating the data store.
|
|
248
|
-
* @param wait - True if you want to wait for it.
|
|
249
|
-
* @returns the data store runtime if the data store exists and is initially referenced; undefined otherwise.
|
|
250
|
-
*/
|
|
251
|
-
private getDataStoreIfInitiallyReferenced;
|
|
252
|
-
/**
|
|
253
|
-
* Notifies this object to take the snapshot of the container.
|
|
254
|
-
* @deprecated - Use summarize to get summary of the container runtime.
|
|
255
|
-
*/
|
|
256
|
-
snapshot(): Promise<ITree>;
|
|
257
273
|
private addContainerStateToSummary;
|
|
258
274
|
private replayPendingStates;
|
|
259
275
|
/**
|
|
@@ -271,15 +287,40 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
271
287
|
private processAliasMessage;
|
|
272
288
|
processSignal(message: ISignalMessage, local: boolean): void;
|
|
273
289
|
getRootDataStore(id: string, wait?: boolean): Promise<IFluidRouter>;
|
|
274
|
-
protected getDataStore(id: string, wait?: boolean): Promise<IFluidRouter>;
|
|
275
290
|
setFlushMode(mode: FlushMode): void;
|
|
276
291
|
flush(): void;
|
|
277
292
|
orderSequentially(callback: () => void): void;
|
|
278
293
|
private trackOrderSequentiallyCalls;
|
|
279
|
-
createDataStore(pkg: string | string[]): Promise<
|
|
294
|
+
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
295
|
+
/**
|
|
296
|
+
* Creates a root datastore directly with a user generated id and attaches it to storage.
|
|
297
|
+
* It is vulnerable to name collisions and should not be used.
|
|
298
|
+
*
|
|
299
|
+
* This method will be removed. See #6465.
|
|
300
|
+
*/
|
|
301
|
+
private createRootDataStoreLegacy;
|
|
280
302
|
createRootDataStore(pkg: string | string[], rootDataStoreId: string): Promise<IFluidRouter>;
|
|
303
|
+
/**
|
|
304
|
+
* Creates a data store then attempts to alias it.
|
|
305
|
+
* If aliasing fails, it will raise an exception.
|
|
306
|
+
*
|
|
307
|
+
* This method will be removed. See #6465.
|
|
308
|
+
*
|
|
309
|
+
* @param pkg - Package name of the data store
|
|
310
|
+
* @param alias - Alias to be assigned to the data store
|
|
311
|
+
* @param props - Properties for the data store
|
|
312
|
+
* @returns - An aliased data store which can can be found / loaded by alias.
|
|
313
|
+
*/
|
|
314
|
+
private createAndAliasDataStore;
|
|
281
315
|
createDetachedRootDataStore(pkg: Readonly<string[]>, rootDataStoreId: string): IFluidDataStoreContextDetached;
|
|
282
316
|
createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
|
|
317
|
+
/**
|
|
318
|
+
* Creates a possibly root datastore directly with a possibly user generated id and attaches it to storage.
|
|
319
|
+
* It is vulnerable to name collisions if both aforementioned conditions are true, and should not be used.
|
|
320
|
+
*
|
|
321
|
+
* This method will be removed. See #6465.
|
|
322
|
+
*/
|
|
323
|
+
private _createDataStoreWithPropsLegacy;
|
|
283
324
|
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string, isRoot?: boolean): Promise<IFluidRouter>;
|
|
284
325
|
private _createDataStore;
|
|
285
326
|
private canSendOps;
|
|
@@ -313,19 +354,19 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
313
354
|
* Returns a summary of the runtime at the current sequence number.
|
|
314
355
|
*/
|
|
315
356
|
summarize(options: {
|
|
316
|
-
/** Logger to use for correlated summary events */
|
|
317
|
-
summaryLogger: ITelemetryLogger;
|
|
318
357
|
/** True to generate the full tree with no handle reuse optimizations; defaults to false */
|
|
319
358
|
fullTree?: boolean;
|
|
320
359
|
/** True to track the state for this summary in the SummarizerNodes; defaults to true */
|
|
321
360
|
trackState?: boolean;
|
|
361
|
+
/** Logger to use for correlated summary events */
|
|
362
|
+
summaryLogger?: ITelemetryLogger;
|
|
322
363
|
/** True to run garbage collection before summarizing; defaults to true */
|
|
323
364
|
runGC?: boolean;
|
|
324
365
|
/** True to generate full GC data */
|
|
325
366
|
fullGC?: boolean;
|
|
326
367
|
/** True to run GC sweep phase after the mark phase */
|
|
327
368
|
runSweep?: boolean;
|
|
328
|
-
}): Promise<
|
|
369
|
+
}): Promise<IRootSummaryTreeWithStats>;
|
|
329
370
|
/**
|
|
330
371
|
* Implementation of IGarbageCollectionRuntime::updateStateBeforeGC.
|
|
331
372
|
* Before GC runs, called by the garbage collector to update any pending GC state. This is mainly used to notify
|
|
@@ -345,9 +386,8 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
345
386
|
* @param usedRoutes - The routes that are used in all nodes in this Container.
|
|
346
387
|
* @param gcTimestamp - The time when GC was run that generated these used routes. If any node node becomes
|
|
347
388
|
* unreferenced as part of this GC run, this should be used to update the time when it happens.
|
|
348
|
-
* @returns the statistics of the used state of the data stores.
|
|
349
389
|
*/
|
|
350
|
-
updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number):
|
|
390
|
+
updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;
|
|
351
391
|
/**
|
|
352
392
|
* Runs garbage collection and updates the reference / used state of the nodes in the container.
|
|
353
393
|
* @returns the statistics of the garbage collection run.
|
|
@@ -381,6 +421,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
|
|
|
381
421
|
private clearPartialChunks;
|
|
382
422
|
private updateDocumentDirtyState;
|
|
383
423
|
submitDataStoreOp(id: string, contents: any, localOpMetadata?: unknown): void;
|
|
424
|
+
submitDataStoreAliasOp(contents: any, localOpMetadata: unknown): void;
|
|
384
425
|
uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
385
426
|
private submit;
|
|
386
427
|
private submitChunkedMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerRuntime.d.ts","sourceRoot":"","sources":["../src/containerRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAgD,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EACH,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EAEb,QAAQ,EAER,uBAAuB,EACvB,WAAW,EACX,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