@fluidframework/container-runtime 2.0.0-internal.2.3.0 → 2.0.0-internal.2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blobManager.d.ts +1 -1
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +8 -8
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +15 -0
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +26 -11
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +5 -8
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +3 -3
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +14 -14
- package/dist/dataStores.js.map +1 -1
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js +5 -4
- package/dist/garbageCollection.js.map +1 -1
- package/dist/garbageCollectionConstants.d.ts +1 -0
- package/dist/garbageCollectionConstants.d.ts.map +1 -1
- package/dist/garbageCollectionConstants.js +4 -2
- package/dist/garbageCollectionConstants.js.map +1 -1
- package/dist/garbageCollectionTombstoneUtils.d.ts +5 -4
- package/dist/garbageCollectionTombstoneUtils.d.ts.map +1 -1
- package/dist/garbageCollectionTombstoneUtils.js +8 -13
- package/dist/garbageCollectionTombstoneUtils.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/blobManager.d.ts +1 -1
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +9 -9
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +15 -0
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +25 -10
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +5 -8
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +3 -3
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +15 -15
- package/lib/dataStores.js.map +1 -1
- package/lib/garbageCollection.d.ts.map +1 -1
- package/lib/garbageCollection.js +6 -5
- package/lib/garbageCollection.js.map +1 -1
- package/lib/garbageCollectionConstants.d.ts +1 -0
- package/lib/garbageCollectionConstants.d.ts.map +1 -1
- package/lib/garbageCollectionConstants.js +3 -1
- package/lib/garbageCollectionConstants.js.map +1 -1
- package/lib/garbageCollectionTombstoneUtils.d.ts +5 -4
- package/lib/garbageCollectionTombstoneUtils.d.ts.map +1 -1
- package/lib/garbageCollectionTombstoneUtils.js +9 -14
- package/lib/garbageCollectionTombstoneUtils.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +18 -35
- package/src/blobManager.ts +16 -11
- package/src/containerRuntime.ts +36 -8
- package/src/dataStoreContext.ts +13 -14
- package/src/dataStores.ts +25 -19
- package/src/garbageCollection.ts +12 -8
- package/src/garbageCollectionConstants.ts +3 -1
- package/src/garbageCollectionTombstoneUtils.ts +11 -14
- package/src/index.ts +2 -0
- package/src/packageVersion.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollectionConstants.js","sourceRoot":"","sources":["../src/garbageCollectionConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAc,CAAC,CAAC;AAC5C,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAc,CAAC,CAAC;AAE7C,wCAAwC;AACxC,MAAM,CAAC,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AACxD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAC9D,kDAAkD;AAClD,MAAM,CAAC,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAClE,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,eAAe,GAAG,sCAAsC,CAAC;AACtE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAC5E,qHAAqH;AACrH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,
|
|
1
|
+
{"version":3,"file":"garbageCollectionConstants.js","sourceRoot":"","sources":["../src/garbageCollectionConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAc,CAAC,CAAC;AAC5C,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAc,CAAC,CAAC;AAE7C,wCAAwC;AACxC,MAAM,CAAC,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AACxD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAC9D,kDAAkD;AAClD,MAAM,CAAC,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAClE,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,eAAe,GAAG,sCAAsC,CAAC;AACtE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAC5E,qHAAqH;AACrH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,wFAAwF;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AACtF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,wBAAwB,GAAG,+CAA+C,CAAC;AACxF,6CAA6C;AAC7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AAEtF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,SAAS;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,QAAQ,CAAC,CAAC,UAAU","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { GCVersion } from \"./summaryFormat\";\n\n/** The stable version of garbage collection in production. */\nexport const stableGCVersion: GCVersion = 1;\n/** The current version of garbage collection. */\nexport const currentGCVersion: GCVersion = 2;\n\n// Feature gate key to turn GC on / off.\nexport const runGCKey = \"Fluid.GarbageCollection.RunGC\";\n// Feature gate key to turn GC sweep on / off.\nexport const runSweepKey = \"Fluid.GarbageCollection.RunSweep\";\n// Feature gate key to turn GC test mode on / off.\nexport const gcTestModeKey = \"Fluid.GarbageCollection.GCTestMode\";\n// Feature gate key to expire a session after a set period of time.\nexport const runSessionExpiryKey = \"Fluid.GarbageCollection.RunSessionExpiry\";\n// Feature gate key to write the gc blob as a handle if the data is the same.\nexport const trackGCStateKey = \"Fluid.GarbageCollection.TrackGCState\";\n// Feature gate key to turn GC sweep log off.\nexport const disableSweepLogKey = \"Fluid.GarbageCollection.DisableSweepLog\";\n// Feature gate key to disable the tombstone feature, i.e., tombstone information is not read / written into summary.\nexport const disableTombstoneKey = \"Fluid.GarbageCollection.DisableTombstone\";\n// Feature gate to enable throwing an error when tombstone object is loaded (requested).\nexport const throwOnTombstoneLoadKey = \"Fluid.GarbageCollection.ThrowOnTombstoneLoad\";\n// Feature gate to enable throwing an error when tombstone object is used (e.g. outgoing or incoming ops).\nexport const throwOnTombstoneUsageKey = \"Fluid.GarbageCollection.ThrowOnTombstoneUsage\";\n// Feature gate to enable GC version upgrade.\nexport const gcVersionUpgradeToV2Key = \"Fluid.GarbageCollection.GCVersionUpgradeToV2\";\n\n// One day in milliseconds.\nexport const oneDayMs = 1 * 24 * 60 * 60 * 1000;\n\nexport const defaultInactiveTimeoutMs = 7 * oneDayMs; // 7 days\nexport const defaultSessionExpiryDurationMs = 30 * oneDayMs; // 30 days\n"]}
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import { ITelemetryGenericEvent } from "@fluidframework/common-definitions";
|
|
6
6
|
import { MonitoringContext } from "@fluidframework/telemetry-utils";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Adds isSummarizerClient, packagePath, and error to telemetry properties.
|
|
8
|
+
* Consolidates info / logic for logging when we encounter a Tombstone
|
|
11
9
|
*/
|
|
12
|
-
export declare function sendGCTombstoneEvent(mc: MonitoringContext, event: ITelemetryGenericEvent
|
|
10
|
+
export declare function sendGCTombstoneEvent(mc: MonitoringContext, event: ITelemetryGenericEvent & {
|
|
11
|
+
category: "error" | "generic";
|
|
12
|
+
isSummarizerClient: boolean;
|
|
13
|
+
}, packagePath: readonly string[] | undefined, error?: unknown): void;
|
|
13
14
|
//# sourceMappingURL=garbageCollectionTombstoneUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollectionTombstoneUtils.d.ts","sourceRoot":"","sources":["../src/garbageCollectionTombstoneUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE
|
|
1
|
+
{"version":3,"file":"garbageCollectionTombstoneUtils.d.ts","sourceRoot":"","sources":["../src/garbageCollectionTombstoneUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE;;GAEG;AACH,wBAAgB,oBAAoB,CAChC,EAAE,EAAE,iBAAiB,EACrB,KAAK,EAAE,sBAAsB,GAAG;IAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,kBAAkB,EAAE,OAAO,CAAA;CAAE,EAC9F,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC1C,KAAK,CAAC,EAAE,OAAO,QAUlB"}
|
|
@@ -3,22 +3,17 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { packagePathToTelemetryProperty } from "@fluidframework/runtime-utils";
|
|
6
|
-
import { throwOnTombstoneUsageKey } from "./garbageCollectionConstants";
|
|
6
|
+
import { disableTombstoneKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey } from "./garbageCollectionConstants";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Adds isSummarizerClient, packagePath, and error to telemetry properties.
|
|
8
|
+
* Consolidates info / logic for logging when we encounter a Tombstone
|
|
11
9
|
*/
|
|
12
|
-
export function sendGCTombstoneEvent(mc, event,
|
|
13
|
-
var _a;
|
|
14
|
-
const throwOnTombstoneUsage = event.throwOnTombstoneUsage = (_a = mc.config.getBoolean(throwOnTombstoneUsageKey)) !== null && _a !== void 0 ? _a : false;
|
|
10
|
+
export function sendGCTombstoneEvent(mc, event, packagePath, error) {
|
|
15
11
|
event.pkg = packagePathToTelemetryProperty(packagePath);
|
|
16
|
-
event.
|
|
17
|
-
|
|
18
|
-
mc.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
12
|
+
event.tombstoneFlags = JSON.stringify({
|
|
13
|
+
DisableTombstone: mc.config.getBoolean(disableTombstoneKey),
|
|
14
|
+
ThrowOnTombstoneUsage: mc.config.getBoolean(throwOnTombstoneUsageKey),
|
|
15
|
+
ThrowOnTombstoneLoad: mc.config.getBoolean(throwOnTombstoneLoadKey),
|
|
16
|
+
});
|
|
17
|
+
mc.logger.sendTelemetryEvent(event, error);
|
|
23
18
|
}
|
|
24
19
|
//# sourceMappingURL=garbageCollectionTombstoneUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollectionTombstoneUtils.js","sourceRoot":"","sources":["../src/garbageCollectionTombstoneUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"garbageCollectionTombstoneUtils.js","sourceRoot":"","sources":["../src/garbageCollectionTombstoneUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEtH;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAChC,EAAqB,EACrB,KAA8F,EAC9F,WAA0C,EAC1C,KAAe;IAEf,KAAK,CAAC,GAAG,GAAG,8BAA8B,CAAC,WAAW,CAAC,CAAC;IACxD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC;QAClC,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC;QAC3D,qBAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,wBAAwB,CAAC;QACrE,oBAAoB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC;KACtE,CAAC,CAAC;IAEH,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryGenericEvent } from \"@fluidframework/common-definitions\";\nimport { packagePathToTelemetryProperty } from \"@fluidframework/runtime-utils\";\nimport { MonitoringContext } from \"@fluidframework/telemetry-utils\";\nimport { disableTombstoneKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey } from \"./garbageCollectionConstants\";\n\n/**\n * Consolidates info / logic for logging when we encounter a Tombstone\n */\nexport function sendGCTombstoneEvent(\n mc: MonitoringContext,\n event: ITelemetryGenericEvent & { category: \"error\" | \"generic\", isSummarizerClient: boolean },\n packagePath: readonly string[] | undefined,\n error?: unknown,\n) {\n event.pkg = packagePathToTelemetryProperty(packagePath);\n event.tombstoneFlags = JSON.stringify({\n DisableTombstone: mc.config.getBoolean(disableTombstoneKey),\n ThrowOnTombstoneUsage: mc.config.getBoolean(throwOnTombstoneUsageKey),\n ThrowOnTombstoneLoad: mc.config.getBoolean(throwOnTombstoneLoadKey),\n });\n\n mc.logger.sendTelemetryEvent(event, error);\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { ContainerMessageType, ContainerRuntimeMessage, IGCRuntimeOptions, ISummaryRuntimeOptions, ISummaryBaseConfiguration, ISummaryConfigurationHeuristics, ISummaryConfigurationDisableSummarizer, ISummaryConfigurationDisableHeuristics, IContainerRuntimeOptions, IRootSummaryTreeWithStats, isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, ISummaryConfiguration, DefaultSummaryConfiguration, ICompressionRuntimeOptions, CompressionAlgorithms, } from "./containerRuntime";
|
|
5
|
+
export { ContainerMessageType, ContainerRuntimeMessage, IGCRuntimeOptions, ISummaryRuntimeOptions, ISummaryBaseConfiguration, ISummaryConfigurationHeuristics, ISummaryConfigurationDisableSummarizer, ISummaryConfigurationDisableHeuristics, IContainerRuntimeOptions, IRootSummaryTreeWithStats, isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, AllowTombstoneRequestHeaderKey, TombstoneResponseHeaderKey, ISummaryConfiguration, DefaultSummaryConfiguration, ICompressionRuntimeOptions, CompressionAlgorithms, } from "./containerRuntime";
|
|
6
6
|
export { FluidDataStoreRegistry } from "./dataStoreRegistry";
|
|
7
7
|
export { IGCStats, } from "./garbageCollection";
|
|
8
8
|
export { IPendingFlush, IPendingLocalState, IPendingMessage, IPendingState, } from "./pendingStateManager";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACH,QAAQ,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACH,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,8BAA8B,EAC9B,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACH,QAAQ,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACH,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { ContainerMessageType, isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, DefaultSummaryConfiguration, CompressionAlgorithms, } from "./containerRuntime";
|
|
5
|
+
export { ContainerMessageType, isRuntimeMessage, RuntimeMessage, agentSchedulerId, ContainerRuntime, RuntimeHeaders, AllowTombstoneRequestHeaderKey, TombstoneResponseHeaderKey, DefaultSummaryConfiguration, CompressionAlgorithms, } from "./containerRuntime";
|
|
6
6
|
export { FluidDataStoreRegistry } from "./dataStoreRegistry";
|
|
7
7
|
export { Summarizer } from "./summarizer";
|
|
8
8
|
export { ISummarizer, } from "./summarizerTypes";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EAUpB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EAUpB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,8BAA8B,EAC9B,0BAA0B,EAE1B,2BAA2B,EAE3B,qBAAqB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAU7D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAkBH,WAAW,GAUd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAUH,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAoC,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAc,oBAAoB,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n ContainerMessageType,\n ContainerRuntimeMessage,\n IGCRuntimeOptions,\n ISummaryRuntimeOptions,\n ISummaryBaseConfiguration,\n ISummaryConfigurationHeuristics,\n ISummaryConfigurationDisableSummarizer,\n ISummaryConfigurationDisableHeuristics,\n IContainerRuntimeOptions,\n IRootSummaryTreeWithStats,\n isRuntimeMessage,\n RuntimeMessage,\n agentSchedulerId,\n ContainerRuntime,\n RuntimeHeaders,\n AllowTombstoneRequestHeaderKey,\n TombstoneResponseHeaderKey,\n ISummaryConfiguration,\n DefaultSummaryConfiguration,\n ICompressionRuntimeOptions,\n CompressionAlgorithms,\n} from \"./containerRuntime\";\nexport { FluidDataStoreRegistry } from \"./dataStoreRegistry\";\nexport {\n IGCStats,\n} from \"./garbageCollection\";\nexport {\n IPendingFlush,\n IPendingLocalState,\n IPendingMessage,\n IPendingState,\n} from \"./pendingStateManager\";\nexport { Summarizer } from \"./summarizer\";\nexport {\n EnqueueSummarizeResult,\n IAckSummaryResult,\n IBaseSummarizeResult,\n IBroadcastSummaryResult,\n ICancellationToken,\n IConnectableRuntime,\n IEnqueueSummarizeOptions,\n IGenerateSummaryTreeResult,\n IGeneratedSummaryStats,\n INackSummaryResult,\n IOnDemandSummarizeOptions,\n IProvideSummarizer,\n IRefreshSummaryAckOptions,\n ISubmitSummaryOpResult,\n ISubmitSummaryOptions,\n ISummarizeOptions,\n ISummarizeResults,\n ISummarizer,\n ISummarizerEvents,\n ISummarizerInternalsProvider,\n ISummarizerRuntime,\n ISummarizingWarning,\n ISummaryCancellationToken,\n IUploadSummaryResult,\n SubmitSummaryResult,\n SummarizeResultPart,\n SummarizerStopReason,\n} from \"./summarizerTypes\";\nexport {\n IAckedSummary,\n IClientSummaryWatcher,\n ISummary,\n ISummaryCollectionOpEvents,\n ISummaryAckMessage,\n ISummaryNackMessage,\n ISummaryOpMessage,\n OpActionEventListener,\n OpActionEventName,\n SummaryCollection,\n} from \"./summaryCollection\";\nexport { ICancellableSummarizerController, neverCancelledSummaryToken } from \"./runWhileConnectedCoordinator\";\nexport { IChunkedOp, unpackRuntimeMessage } from \"./opLifecycle\";\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/container-runtime";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-internal.2.3.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.2.3.1";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export const pkgName = "@fluidframework/container-runtime";
|
|
8
|
-
export const pkgVersion = "2.0.0-internal.2.3.
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.2.3.1";
|
|
9
9
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.2.3.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.2.3.1\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.0.0-internal.2.3.
|
|
3
|
+
"version": "2.0.0-internal.2.3.1",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -65,19 +65,19 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
67
67
|
"@fluidframework/common-utils": "^1.0.0",
|
|
68
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.2.3.
|
|
69
|
-
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.2.3.
|
|
70
|
-
"@fluidframework/container-utils": ">=2.0.0-internal.2.3.
|
|
71
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.2.3.
|
|
72
|
-
"@fluidframework/datastore": ">=2.0.0-internal.2.3.
|
|
73
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.2.3.
|
|
74
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.2.3.
|
|
75
|
-
"@fluidframework/garbage-collector": ">=2.0.0-internal.2.3.
|
|
68
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
69
|
+
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
70
|
+
"@fluidframework/container-utils": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
71
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
72
|
+
"@fluidframework/datastore": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
73
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
74
|
+
"@fluidframework/driver-utils": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
75
|
+
"@fluidframework/garbage-collector": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
76
76
|
"@fluidframework/protocol-base": "^0.1038.2000",
|
|
77
77
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
78
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.2.3.
|
|
79
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.2.3.
|
|
80
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-internal.2.3.
|
|
78
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
79
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
80
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
81
81
|
"double-ended-queue": "^2.1.0-0",
|
|
82
82
|
"events": "^3.1.0",
|
|
83
83
|
"lz4js": "^0.2.0",
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"@fluid-tools/build-cli": "^0.7.0",
|
|
88
88
|
"@fluidframework/build-common": "^1.1.0",
|
|
89
89
|
"@fluidframework/build-tools": "^0.7.0",
|
|
90
|
-
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.2.
|
|
90
|
+
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.2.3.0",
|
|
91
91
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
92
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.2.3.
|
|
93
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.2.3.
|
|
92
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
93
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.2.3.1 <2.0.0-internal.3.0.0",
|
|
94
94
|
"@microsoft/api-extractor": "^7.22.2",
|
|
95
95
|
"@rushstack/eslint-config": "^2.5.1",
|
|
96
96
|
"@types/double-ended-queue": "^2.1.0",
|
|
@@ -109,25 +109,8 @@
|
|
|
109
109
|
"typescript": "~4.5.5"
|
|
110
110
|
},
|
|
111
111
|
"typeValidation": {
|
|
112
|
-
"version": "2.0.0-internal.2.3.
|
|
113
|
-
"baselineRange": "
|
|
114
|
-
"
|
|
115
|
-
"broken": {
|
|
116
|
-
"RemovedVariableDeclaration_gcBlobPrefix": {
|
|
117
|
-
"forwardCompat": false,
|
|
118
|
-
"backCompat": false
|
|
119
|
-
},
|
|
120
|
-
"RemovedVariableDeclaration_gcTombstoneBlobKey": {
|
|
121
|
-
"forwardCompat": false,
|
|
122
|
-
"backCompat": false
|
|
123
|
-
},
|
|
124
|
-
"RemovedVariableDeclaration_gcTreeKey": {
|
|
125
|
-
"forwardCompat": false,
|
|
126
|
-
"backCompat": false
|
|
127
|
-
},
|
|
128
|
-
"ClassDeclaration_ContainerRuntime": {
|
|
129
|
-
"forwardCompat": false
|
|
130
|
-
}
|
|
131
|
-
}
|
|
112
|
+
"version": "2.0.0-internal.2.3.1",
|
|
113
|
+
"baselineRange": "2.0.0-internal.2.3.0",
|
|
114
|
+
"broken": {}
|
|
132
115
|
}
|
|
133
116
|
}
|
package/src/blobManager.ts
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "@fluidframework/runtime-definitions";
|
|
25
25
|
import { Throttler, formExponentialFn, IThrottler } from "./throttler";
|
|
26
26
|
import { summarizerClientType } from "./summarizerClientElection";
|
|
27
|
-
import {
|
|
27
|
+
import { throwOnTombstoneLoadKey } from "./garbageCollectionConstants";
|
|
28
28
|
import { sendGCTombstoneEvent } from "./garbageCollectionTombstoneUtils";
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -151,7 +151,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
151
151
|
));
|
|
152
152
|
|
|
153
153
|
/** If true, throw an error when a tombstone attachment blob is retrieved. */
|
|
154
|
-
private readonly
|
|
154
|
+
private readonly throwOnTombstoneLoad: boolean;
|
|
155
155
|
/**
|
|
156
156
|
* This stores IDs of tombstoned blobs.
|
|
157
157
|
* Tombstone is a temporary feature that imitates a blob getting swept by garbage collection.
|
|
@@ -183,8 +183,8 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
183
183
|
super();
|
|
184
184
|
this.mc = loggerToMonitoringContext(ChildLogger.create(this.runtime.logger, "BlobManager"));
|
|
185
185
|
// Read the feature flag that tells whether to throw when a tombstone blob is requested.
|
|
186
|
-
this.
|
|
187
|
-
this.mc.config.getBoolean(
|
|
186
|
+
this.throwOnTombstoneLoad =
|
|
187
|
+
this.mc.config.getBoolean(throwOnTombstoneLoadKey) === true &&
|
|
188
188
|
this.runtime.clientDetails.type !== summarizerClientType;
|
|
189
189
|
|
|
190
190
|
this.runtime.on("disconnected", () => this.onDisconnected());
|
|
@@ -274,13 +274,18 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
274
274
|
public async getBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
275
275
|
const request = { url: blobId };
|
|
276
276
|
if (this.tombstonedBlobs.has(blobId) ) {
|
|
277
|
-
const error = responseToException(createResponseError(404, "Blob
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
const error = responseToException(createResponseError(404, "Blob was deleted", request), request);
|
|
278
|
+
sendGCTombstoneEvent(
|
|
279
|
+
this.mc,
|
|
280
|
+
{
|
|
281
|
+
eventName: "GC_Tombstone_Blob_Requested",
|
|
282
|
+
category: this.throwOnTombstoneLoad ? "error" : "generic",
|
|
283
|
+
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
284
|
+
},
|
|
285
|
+
[BlobManager.basePath],
|
|
286
|
+
error,
|
|
287
|
+
);
|
|
288
|
+
if (this.throwOnTombstoneLoad) {
|
|
284
289
|
throw error;
|
|
285
290
|
}
|
|
286
291
|
}
|
package/src/containerRuntime.ts
CHANGED
|
@@ -524,6 +524,30 @@ export enum RuntimeHeaders {
|
|
|
524
524
|
viaHandle = "viaHandle",
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
+
/** True if a tombstoned object should be returned without erroring */
|
|
528
|
+
export const AllowTombstoneRequestHeaderKey = "allowTombstone"; // Belongs in the enum above, but avoiding the breaking change
|
|
529
|
+
|
|
530
|
+
/** Tombstone error responses will have this header set to true */
|
|
531
|
+
export const TombstoneResponseHeaderKey = "isTombstoned"
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* The full set of parsed header data that may be found on Runtime requests
|
|
535
|
+
*/
|
|
536
|
+
export interface RuntimeHeaderData {
|
|
537
|
+
wait?: boolean;
|
|
538
|
+
externalRequest?: boolean;
|
|
539
|
+
viaHandle?: boolean;
|
|
540
|
+
allowTombstone?: boolean;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/** Default values for Runtime Headers */
|
|
544
|
+
export const defaultRuntimeHeaderData: Required<RuntimeHeaderData> = {
|
|
545
|
+
wait: true,
|
|
546
|
+
externalRequest: false,
|
|
547
|
+
viaHandle: false,
|
|
548
|
+
allowTombstone: false,
|
|
549
|
+
}
|
|
550
|
+
|
|
527
551
|
/**
|
|
528
552
|
* Available compression algorithms for op compression.
|
|
529
553
|
*/
|
|
@@ -1460,16 +1484,20 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
|
|
|
1460
1484
|
}
|
|
1461
1485
|
|
|
1462
1486
|
private async getDataStoreFromRequest(id: string, request: IRequest): Promise<IFluidRouter> {
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1487
|
+
const headerData: RuntimeHeaderData = {};
|
|
1488
|
+
if (typeof request.headers?.[RuntimeHeaders.wait] === "boolean") {
|
|
1489
|
+
headerData.wait = request.headers[RuntimeHeaders.wait];
|
|
1490
|
+
}
|
|
1491
|
+
if (typeof request.headers?.[RuntimeHeaders.viaHandle] === "boolean") {
|
|
1492
|
+
headerData.viaHandle = request.headers[RuntimeHeaders.viaHandle];
|
|
1493
|
+
}
|
|
1494
|
+
if (typeof request.headers?.[AllowTombstoneRequestHeaderKey] === "boolean") {
|
|
1495
|
+
headerData.allowTombstone = request.headers[AllowTombstoneRequestHeaderKey];
|
|
1496
|
+
}
|
|
1469
1497
|
|
|
1470
1498
|
await this.dataStores.waitIfPendingAlias(id);
|
|
1471
1499
|
const internalId = this.internalId(id);
|
|
1472
|
-
const dataStoreContext = await this.dataStores.getDataStore(internalId,
|
|
1500
|
+
const dataStoreContext = await this.dataStores.getDataStore(internalId, headerData);
|
|
1473
1501
|
|
|
1474
1502
|
/**
|
|
1475
1503
|
* If GC should run and this an external app request with "externalRequest" header, we need to return
|
|
@@ -1860,7 +1888,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
|
|
|
1860
1888
|
private async getRootDataStoreChannel(id: string, wait = true): Promise<IFluidDataStoreChannel> {
|
|
1861
1889
|
await this.dataStores.waitIfPendingAlias(id);
|
|
1862
1890
|
const internalId = this.internalId(id);
|
|
1863
|
-
const context = await this.dataStores.getDataStore(internalId, wait
|
|
1891
|
+
const context = await this.dataStores.getDataStore(internalId, { wait });
|
|
1864
1892
|
assert(await context.isRoot(), 0x12b /* "did not get root data store" */);
|
|
1865
1893
|
return context.realize();
|
|
1866
1894
|
}
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -775,20 +775,19 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidData
|
|
|
775
775
|
|
|
776
776
|
if (checkTombstone && this.tombstoned) {
|
|
777
777
|
const messageString = `Context is tombstoned! Call site [${callSite}]`;
|
|
778
|
-
const error = new DataCorruptionError(messageString,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
// throwOnTombstoneUsage is set and the client is not a summarizer.
|
|
778
|
+
const error = new DataCorruptionError(messageString, safeTelemetryProps);
|
|
779
|
+
|
|
780
|
+
sendGCTombstoneEvent(
|
|
781
|
+
this.mc,
|
|
782
|
+
{
|
|
783
|
+
eventName: "GC_Tombstone_DataStore_Changed",
|
|
784
|
+
category: this.throwOnTombstoneUsage ? "error" : "generic",
|
|
785
|
+
isSummarizerClient: this.clientDetails.type === summarizerClientType,
|
|
786
|
+
callSite,
|
|
787
|
+
},
|
|
788
|
+
this.pkg,
|
|
789
|
+
error,
|
|
790
|
+
);
|
|
792
791
|
if (this.throwOnTombstoneUsage) {
|
|
793
792
|
throw error;
|
|
794
793
|
}
|
package/src/dataStores.ts
CHANGED
|
@@ -43,7 +43,7 @@ import { assert, Lazy, LazyPromise } from "@fluidframework/common-utils";
|
|
|
43
43
|
import { v4 as uuid } from "uuid";
|
|
44
44
|
import { GCDataBuilder, unpackChildNodesGCDetails, unpackChildNodesUsedRoutes } from "@fluidframework/garbage-collector";
|
|
45
45
|
import { DataStoreContexts } from "./dataStoreContexts";
|
|
46
|
-
import { ContainerRuntime } from "./containerRuntime";
|
|
46
|
+
import { ContainerRuntime, defaultRuntimeHeaderData, RuntimeHeaderData, TombstoneResponseHeaderKey } from "./containerRuntime";
|
|
47
47
|
import {
|
|
48
48
|
FluidDataStoreContext,
|
|
49
49
|
RemoteFluidDataStoreContext,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import { IContainerRuntimeMetadata, nonDataStorePaths, rootHasIsolatedChannels } from "./summaryFormat";
|
|
55
55
|
import { IDataStoreAliasMessage, isDataStoreAliasMessage } from "./dataStore";
|
|
56
56
|
import { GCNodeType } from "./garbageCollection";
|
|
57
|
-
import {
|
|
57
|
+
import { throwOnTombstoneLoadKey } from "./garbageCollectionConstants";
|
|
58
58
|
import { summarizerClientType } from "./summarizerClientElection";
|
|
59
59
|
import { sendGCTombstoneEvent } from "./garbageCollectionTombstoneUtils";
|
|
60
60
|
|
|
@@ -85,7 +85,7 @@ export class DataStores implements IDisposable {
|
|
|
85
85
|
// root data stores that are added.
|
|
86
86
|
private dataStoresSinceLastGC: string[] = [];
|
|
87
87
|
/** If true, throw an error when a tombstone data store is retrieved. */
|
|
88
|
-
private readonly
|
|
88
|
+
private readonly throwOnTombstoneLoad: boolean;
|
|
89
89
|
// The handle to the container runtime. This is used mainly for GC purposes to represent outbound reference from
|
|
90
90
|
// the container runtime to other nodes.
|
|
91
91
|
private readonly containerRuntimeHandle: IFluidHandle;
|
|
@@ -118,8 +118,8 @@ export class DataStores implements IDisposable {
|
|
|
118
118
|
return baseGCDetails.get(dataStoreId);
|
|
119
119
|
};
|
|
120
120
|
// Tombstone should only throw when the feature flag is enabled and the client isn't a summarizer
|
|
121
|
-
this.
|
|
122
|
-
this.mc.config.getBoolean(
|
|
121
|
+
this.throwOnTombstoneLoad =
|
|
122
|
+
this.mc.config.getBoolean(throwOnTombstoneLoadKey) === true &&
|
|
123
123
|
this.runtime.clientDetails.type !== summarizerClientType;
|
|
124
124
|
|
|
125
125
|
// Extract stores stored inside the snapshot
|
|
@@ -430,8 +430,10 @@ export class DataStores implements IDisposable {
|
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
public async getDataStore(id: string,
|
|
434
|
-
const
|
|
433
|
+
public async getDataStore(id: string, requestHeaderData: RuntimeHeaderData): Promise<FluidDataStoreContext> {
|
|
434
|
+
const headerData = { ...defaultRuntimeHeaderData, ...requestHeaderData };
|
|
435
|
+
|
|
436
|
+
const context = await this.contexts.getBoundOrRemoted(id, headerData.wait);
|
|
435
437
|
const request = { url: id };
|
|
436
438
|
if (context === undefined) {
|
|
437
439
|
// The requested data store does not exits. Throw a 404 response exception.
|
|
@@ -439,24 +441,28 @@ export class DataStores implements IDisposable {
|
|
|
439
441
|
}
|
|
440
442
|
|
|
441
443
|
if (context.tombstoned) {
|
|
444
|
+
const shouldFail = this.throwOnTombstoneLoad && !headerData.allowTombstone;
|
|
445
|
+
|
|
442
446
|
// The requested data store is removed by gc. Create a 404 gc response exception.
|
|
443
|
-
const error = responseToException(createResponseError(
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
};
|
|
447
|
+
const error = responseToException(createResponseError(
|
|
448
|
+
404,
|
|
449
|
+
"DataStore was deleted",
|
|
450
|
+
request,
|
|
451
|
+
{ [TombstoneResponseHeaderKey]: true },
|
|
452
|
+
), request);
|
|
450
453
|
sendGCTombstoneEvent(
|
|
451
454
|
this.mc,
|
|
452
|
-
|
|
453
|
-
|
|
455
|
+
{
|
|
456
|
+
eventName: "GC_Tombstone_DataStore_Requested",
|
|
457
|
+
category: shouldFail ? "error" : "generic",
|
|
458
|
+
isSummarizerClient: this.runtime.clientDetails.type === summarizerClientType,
|
|
459
|
+
headers: JSON.stringify(requestHeaderData),
|
|
460
|
+
},
|
|
454
461
|
context.isLoaded ? context.packagePath : undefined,
|
|
455
462
|
error,
|
|
456
463
|
);
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
if (this.throwOnTombstoneUsage) {
|
|
464
|
+
|
|
465
|
+
if (shouldFail) {
|
|
460
466
|
throw error;
|
|
461
467
|
}
|
|
462
468
|
}
|
package/src/garbageCollection.ts
CHANGED
|
@@ -62,9 +62,9 @@ import {
|
|
|
62
62
|
runSessionExpiryKey,
|
|
63
63
|
runSweepKey,
|
|
64
64
|
stableGCVersion,
|
|
65
|
-
throwOnTombstoneUsageKey,
|
|
66
65
|
trackGCStateKey
|
|
67
66
|
} from "./garbageCollectionConstants";
|
|
67
|
+
import { sendGCTombstoneEvent } from "./garbageCollectionTombstoneUtils";
|
|
68
68
|
import { SweepReadyUsageDetectionHandler } from "./gcSweepReadyUsageDetection";
|
|
69
69
|
import {
|
|
70
70
|
getGCVersion,
|
|
@@ -1243,13 +1243,17 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1243
1243
|
eventName = "GC_Tombstone_Blob_Revived";
|
|
1244
1244
|
}
|
|
1245
1245
|
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1246
|
+
sendGCTombstoneEvent(
|
|
1247
|
+
this.mc,
|
|
1248
|
+
{
|
|
1249
|
+
eventName,
|
|
1250
|
+
category: "generic",
|
|
1251
|
+
isSummarizerClient: this.isSummarizerClient,
|
|
1252
|
+
url: trimLeadingSlashes(toNodePath),
|
|
1253
|
+
nodeType,
|
|
1254
|
+
},
|
|
1255
|
+
undefined /* packagePath */,
|
|
1256
|
+
);
|
|
1253
1257
|
}
|
|
1254
1258
|
}
|
|
1255
1259
|
|
|
@@ -24,7 +24,9 @@ export const trackGCStateKey = "Fluid.GarbageCollection.TrackGCState";
|
|
|
24
24
|
export const disableSweepLogKey = "Fluid.GarbageCollection.DisableSweepLog";
|
|
25
25
|
// Feature gate key to disable the tombstone feature, i.e., tombstone information is not read / written into summary.
|
|
26
26
|
export const disableTombstoneKey = "Fluid.GarbageCollection.DisableTombstone";
|
|
27
|
-
// Feature gate to enable throwing an error when tombstone object is
|
|
27
|
+
// Feature gate to enable throwing an error when tombstone object is loaded (requested).
|
|
28
|
+
export const throwOnTombstoneLoadKey = "Fluid.GarbageCollection.ThrowOnTombstoneLoad";
|
|
29
|
+
// Feature gate to enable throwing an error when tombstone object is used (e.g. outgoing or incoming ops).
|
|
28
30
|
export const throwOnTombstoneUsageKey = "Fluid.GarbageCollection.ThrowOnTombstoneUsage";
|
|
29
31
|
// Feature gate to enable GC version upgrade.
|
|
30
32
|
export const gcVersionUpgradeToV2Key = "Fluid.GarbageCollection.GCVersionUpgradeToV2";
|
|
@@ -6,26 +6,23 @@
|
|
|
6
6
|
import { ITelemetryGenericEvent } from "@fluidframework/common-definitions";
|
|
7
7
|
import { packagePathToTelemetryProperty } from "@fluidframework/runtime-utils";
|
|
8
8
|
import { MonitoringContext } from "@fluidframework/telemetry-utils";
|
|
9
|
-
import { throwOnTombstoneUsageKey } from "./garbageCollectionConstants";
|
|
9
|
+
import { disableTombstoneKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey } from "./garbageCollectionConstants";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Adds isSummarizerClient, packagePath, and error to telemetry properties.
|
|
12
|
+
* Consolidates info / logic for logging when we encounter a Tombstone
|
|
15
13
|
*/
|
|
16
14
|
export function sendGCTombstoneEvent(
|
|
17
15
|
mc: MonitoringContext,
|
|
18
|
-
event: ITelemetryGenericEvent,
|
|
19
|
-
isSummarizerClient: boolean,
|
|
16
|
+
event: ITelemetryGenericEvent & { category: "error" | "generic", isSummarizerClient: boolean },
|
|
20
17
|
packagePath: readonly string[] | undefined,
|
|
21
|
-
error?:
|
|
18
|
+
error?: unknown,
|
|
22
19
|
) {
|
|
23
|
-
const throwOnTombstoneUsage = event.throwOnTombstoneUsage = mc.config.getBoolean(throwOnTombstoneUsageKey) ?? false;
|
|
24
20
|
event.pkg = packagePathToTelemetryProperty(packagePath);
|
|
25
|
-
event.
|
|
26
|
-
|
|
27
|
-
mc.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
event.tombstoneFlags = JSON.stringify({
|
|
22
|
+
DisableTombstone: mc.config.getBoolean(disableTombstoneKey),
|
|
23
|
+
ThrowOnTombstoneUsage: mc.config.getBoolean(throwOnTombstoneUsageKey),
|
|
24
|
+
ThrowOnTombstoneLoad: mc.config.getBoolean(throwOnTombstoneLoadKey),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
mc.logger.sendTelemetryEvent(event, error);
|
|
31
28
|
}
|
package/src/index.ts
CHANGED
package/src/packageVersion.ts
CHANGED