@fluidframework/container-runtime 2.0.0-internal.3.4.2 → 2.0.0-internal.3.4.3
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/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +3 -2
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +1 -9
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +1 -52
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -2
- package/dist/gc/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/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +4 -3
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +1 -9
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +0 -50
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/index.d.ts +1 -1
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -1
- package/lib/gc/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 +14 -14
- package/src/gc/garbageCollection.ts +4 -7
- package/src/gc/gcHelpers.ts +1 -75
- package/src/gc/index.ts +0 -1
- package/src/packageVersion.ts +1 -1
package/lib/gc/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export { GarbageCollector } from "./garbageCollection";
|
|
6
6
|
export { currentGCVersion, defaultInactiveTimeoutMs, defaultSessionExpiryDurationMs, disableSweepLogKey, GCNodeType, gcTestModeKey, gcTombstoneGenerationOptionName, gcSweepGenerationOptionName, GCFeatureMatrix, GCVersion, gcVersionUpgradeToV2Key, IGarbageCollectionRuntime, // Deprecated
|
|
7
7
|
IGarbageCollector, IGarbageCollectorConfigs, IGarbageCollectorCreateParams, IGCMetadata, IGCRuntimeOptions, IGCStats, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, sweepAttachmentBlobsKey, sweepDatastoresKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey, UnreferencedState, } from "./gcDefinitions";
|
|
8
|
-
export {
|
|
8
|
+
export { sendGCUnexpectedUsageEvent, shouldAllowGcTombstoneEnforcement, shouldAllowGcSweep, } from "./gcHelpers";
|
|
9
9
|
export { GCSummaryStateTracker } from "./gcSummaryStateTracker";
|
|
10
10
|
export { skipClosureForXDaysKey, closuresMapLocalStorageKey, SweepReadyUsageDetectionHandler, } from "./gcSweepReadyUsageDetection";
|
|
11
11
|
export { UnreferencedStateTracker } from "./gcUnreferencedStateTracker";
|
package/lib/gc/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAC3B,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,yBAAyB,EAAE,aAAa;AACxC,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAC7B,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAC3B,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,yBAAyB,EAAE,aAAa;AACxC,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAC7B,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,0BAA0B,EAC1B,iCAAiC,EACjC,kBAAkB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACN,sBAAsB,EACtB,0BAA0B,EAC1B,+BAA+B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/lib/gc/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { GarbageCollector } from "./garbageCollection";
|
|
6
6
|
export { currentGCVersion, defaultInactiveTimeoutMs, defaultSessionExpiryDurationMs, disableSweepLogKey, GCNodeType, gcTestModeKey, gcTombstoneGenerationOptionName, gcSweepGenerationOptionName, gcVersionUpgradeToV2Key, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, sweepAttachmentBlobsKey, sweepDatastoresKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey, UnreferencedState, } from "./gcDefinitions";
|
|
7
|
-
export {
|
|
7
|
+
export { sendGCUnexpectedUsageEvent, shouldAllowGcTombstoneEnforcement, shouldAllowGcSweep, } from "./gcHelpers";
|
|
8
8
|
export { GCSummaryStateTracker } from "./gcSummaryStateTracker";
|
|
9
9
|
export { skipClosureForXDaysKey, closuresMapLocalStorageKey, SweepReadyUsageDetectionHandler, } from "./gcSweepReadyUsageDetection";
|
|
10
10
|
export { UnreferencedStateTracker } from "./gcUnreferencedStateTracker";
|
package/lib/gc/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAG3B,uBAAuB,EAQvB,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAG3B,uBAAuB,EAQvB,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,0BAA0B,EAC1B,iCAAiC,EACjC,kBAAkB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACN,sBAAsB,EACtB,0BAA0B,EAC1B,+BAA+B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { GarbageCollector } from \"./garbageCollection\";\nexport {\n\tcurrentGCVersion,\n\tdefaultInactiveTimeoutMs,\n\tdefaultSessionExpiryDurationMs,\n\tdisableSweepLogKey,\n\tGCNodeType,\n\tgcTestModeKey,\n\tgcTombstoneGenerationOptionName,\n\tgcSweepGenerationOptionName,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tgcVersionUpgradeToV2Key,\n\tIGarbageCollectionRuntime, // Deprecated\n\tIGarbageCollector,\n\tIGarbageCollectorConfigs,\n\tIGarbageCollectorCreateParams,\n\tIGCMetadata,\n\tIGCRuntimeOptions,\n\tIGCStats,\n\toneDayMs,\n\trunGCKey,\n\trunSessionExpiryKey,\n\trunSweepKey,\n\tstableGCVersion,\n\tsweepAttachmentBlobsKey,\n\tsweepDatastoresKey,\n\tthrowOnTombstoneLoadKey,\n\tthrowOnTombstoneUsageKey,\n\tUnreferencedState,\n} from \"./gcDefinitions\";\nexport {\n\tsendGCUnexpectedUsageEvent,\n\tshouldAllowGcTombstoneEnforcement,\n\tshouldAllowGcSweep,\n} from \"./gcHelpers\";\nexport { GCSummaryStateTracker } from \"./gcSummaryStateTracker\";\nexport {\n\tskipClosureForXDaysKey,\n\tclosuresMapLocalStorageKey,\n\tSweepReadyUsageDetectionHandler,\n} from \"./gcSweepReadyUsageDetection\";\nexport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker\";\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.3.4.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.3.4.3";
|
|
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.3.4.
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.3.4.3";
|
|
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.3.4.
|
|
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.3.4.3\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.0.0-internal.3.4.
|
|
3
|
+
"version": "2.0.0-internal.3.4.3",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
39
39
|
"@fluidframework/common-utils": "^1.1.1",
|
|
40
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.3.4.
|
|
41
|
-
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.4.
|
|
42
|
-
"@fluidframework/container-utils": ">=2.0.0-internal.3.4.
|
|
43
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.3.4.
|
|
44
|
-
"@fluidframework/datastore": ">=2.0.0-internal.3.4.
|
|
45
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.3.4.
|
|
46
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.3.4.
|
|
47
|
-
"@fluidframework/garbage-collector": ">=2.0.0-internal.3.4.
|
|
40
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
41
|
+
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
42
|
+
"@fluidframework/container-utils": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
43
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
44
|
+
"@fluidframework/datastore": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
45
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
46
|
+
"@fluidframework/driver-utils": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
47
|
+
"@fluidframework/garbage-collector": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
48
48
|
"@fluidframework/protocol-base": "^0.1038.4000",
|
|
49
49
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
50
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.3.4.
|
|
51
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.3.4.
|
|
52
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-internal.3.4.
|
|
50
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
51
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
52
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
53
53
|
"double-ended-queue": "^2.1.0-0",
|
|
54
54
|
"events": "^3.1.0",
|
|
55
55
|
"lz4js": "^0.2.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@fluidframework/build-tools": "^0.13.0",
|
|
62
62
|
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.3.2.0",
|
|
63
63
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
64
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.4.
|
|
65
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.3.4.
|
|
64
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
65
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.3.4.3 <2.0.0-internal.4.0.0",
|
|
66
66
|
"@microsoft/api-extractor": "^7.34.4",
|
|
67
67
|
"@types/double-ended-queue": "^2.1.0",
|
|
68
68
|
"@types/events": "^3.0.0",
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
IGCMetadata,
|
|
53
53
|
IGarbageCollectorConfigs,
|
|
54
54
|
} from "./gcDefinitions";
|
|
55
|
-
import {
|
|
55
|
+
import { sendGCUnexpectedUsageEvent } from "./gcHelpers";
|
|
56
56
|
import { GCSummaryStateTracker } from "./gcSummaryStateTracker";
|
|
57
57
|
import { UnreferencedStateTracker } from "./gcUnreferencedStateTracker";
|
|
58
58
|
|
|
@@ -210,12 +210,9 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
210
210
|
return getGCDataFromSnapshot(gcSnapshotTree, readAndParseBlob);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
// back-compat - Older documents
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
createParams.metadata,
|
|
217
|
-
readAndParseBlob,
|
|
218
|
-
);
|
|
213
|
+
// back-compat - Older documents get their gc data reset for simplicity as there are few of them
|
|
214
|
+
// incremental gc summary will not work with older gc data as well
|
|
215
|
+
return undefined;
|
|
219
216
|
} catch (error) {
|
|
220
217
|
const dpe = DataProcessingError.wrapIfUnrecognized(
|
|
221
218
|
error,
|
package/src/gc/gcHelpers.ts
CHANGED
|
@@ -4,23 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { ITelemetryGenericEvent } from "@fluidframework/common-definitions";
|
|
7
|
-
import { assert } from "@fluidframework/common-utils";
|
|
8
|
-
import { ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
9
7
|
import {
|
|
10
|
-
gcTreeKey,
|
|
11
8
|
IGarbageCollectionNodeData,
|
|
12
|
-
IGarbageCollectionSnapshotData,
|
|
13
9
|
IGarbageCollectionState,
|
|
14
|
-
IGarbageCollectionSummaryDetailsLegacy,
|
|
15
10
|
} from "@fluidframework/runtime-definitions";
|
|
16
|
-
import { packagePathToTelemetryProperty
|
|
11
|
+
import { packagePathToTelemetryProperty } from "@fluidframework/runtime-utils";
|
|
17
12
|
import { MonitoringContext } from "@fluidframework/telemetry-utils";
|
|
18
|
-
import { getSummaryForDatastores } from "../dataStores";
|
|
19
|
-
import {
|
|
20
|
-
dataStoreAttributesBlobName,
|
|
21
|
-
IContainerRuntimeMetadata,
|
|
22
|
-
ReadFluidDataStoreAttributes,
|
|
23
|
-
} from "../summary";
|
|
24
13
|
import {
|
|
25
14
|
disableTombstoneKey,
|
|
26
15
|
GCFeatureMatrix,
|
|
@@ -139,66 +128,3 @@ export function generateSortedGCState(gcState: IGarbageCollectionState): IGarbag
|
|
|
139
128
|
}
|
|
140
129
|
return sortedGCState;
|
|
141
130
|
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* This is for back-compat only - Before GC data was written at the root of the summary tree, individual GC blobs were
|
|
145
|
-
* written at data store's snapshot tree. This function consolidates them into the new IGarbageCollectionState format.
|
|
146
|
-
*/
|
|
147
|
-
export async function getSnapshotDataFromOldSnapshotFormat(
|
|
148
|
-
oldSnapshot: ISnapshotTree,
|
|
149
|
-
metadata: IContainerRuntimeMetadata | undefined,
|
|
150
|
-
readAndParseBlob: ReadAndParseBlob,
|
|
151
|
-
): Promise<IGarbageCollectionSnapshotData | undefined> {
|
|
152
|
-
// Add a node for the root node that is not present in older snapshot format.
|
|
153
|
-
const gcState: IGarbageCollectionState = {
|
|
154
|
-
gcNodes: { "/": { outboundRoutes: [] } },
|
|
155
|
-
};
|
|
156
|
-
const dataStoreSnapshotTree = getSummaryForDatastores(oldSnapshot, metadata);
|
|
157
|
-
assert(
|
|
158
|
-
dataStoreSnapshotTree !== undefined,
|
|
159
|
-
0x2a8 /* "Expected data store snapshot tree in base snapshot" */,
|
|
160
|
-
);
|
|
161
|
-
for (const [dsId, dsSnapshotTree] of Object.entries(dataStoreSnapshotTree.trees)) {
|
|
162
|
-
const blobId = dsSnapshotTree.blobs[gcTreeKey];
|
|
163
|
-
if (blobId === undefined) {
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const gcSummaryDetails = await readAndParseBlob<IGarbageCollectionSummaryDetailsLegacy>(
|
|
168
|
-
blobId,
|
|
169
|
-
);
|
|
170
|
-
// If there are no nodes for this data store, skip it.
|
|
171
|
-
if (gcSummaryDetails.gcData?.gcNodes === undefined) {
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const dsRootId = `/${dsId}`;
|
|
176
|
-
// Since we used to write GC data at data store level, we won't have an entry for the root ("/").
|
|
177
|
-
// Construct that entry by adding root data store ids to its outbound routes.
|
|
178
|
-
const initialSnapshotDetails = await readAndParseBlob<ReadFluidDataStoreAttributes>(
|
|
179
|
-
dsSnapshotTree.blobs[dataStoreAttributesBlobName],
|
|
180
|
-
);
|
|
181
|
-
if (initialSnapshotDetails.isRootDataStore) {
|
|
182
|
-
gcState.gcNodes["/"].outboundRoutes.push(dsRootId);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
for (const [id, outboundRoutes] of Object.entries(gcSummaryDetails.gcData.gcNodes)) {
|
|
186
|
-
// Prefix the data store id to the GC node ids to make them relative to the root from being
|
|
187
|
-
// relative to the data store. Similar to how its done in DataStore::getGCData.
|
|
188
|
-
const rootId = id === "/" ? dsRootId : `${dsRootId}${id}`;
|
|
189
|
-
gcState.gcNodes[rootId] = {
|
|
190
|
-
outboundRoutes: Array.from(outboundRoutes),
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
assert(
|
|
194
|
-
gcState.gcNodes[dsRootId] !== undefined,
|
|
195
|
-
0x2a9 /* GC nodes for data store not in GC blob */,
|
|
196
|
-
);
|
|
197
|
-
gcState.gcNodes[dsRootId].unreferencedTimestampMs = gcSummaryDetails.unrefTimestamp;
|
|
198
|
-
}
|
|
199
|
-
// If there is only one node (root node just added above), either GC is disabled or we are loading from
|
|
200
|
-
// the first summary generated by detached container. In both cases, GC was not run - return undefined.
|
|
201
|
-
return Object.keys(gcState.gcNodes).length === 1
|
|
202
|
-
? undefined
|
|
203
|
-
: { gcState, tombstones: undefined, deletedNodes: undefined };
|
|
204
|
-
}
|
package/src/gc/index.ts
CHANGED
package/src/packageVersion.ts
CHANGED