@fluidframework/container-runtime 2.0.0-dev-rc.5.0.0.263932 → 2.0.0-dev-rc.5.0.0.267932
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/api-report/container-runtime.api.md +43 -53
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +4 -4
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +1 -1
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +3 -3
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +3 -3
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +2 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +14 -14
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts +2 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +12 -19
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +74 -120
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +7 -8
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +3 -3
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +4 -3
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +2 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +1 -3
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +18 -21
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +11 -30
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +3 -30
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -3
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +2 -3
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +2 -35
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +9 -62
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +2 -2
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/gcUnreferencedStateTracker.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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/messageTypes.d.ts +1 -1
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +2 -2
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +11 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +13 -2
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +10 -3
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +7 -0
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +4 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +12 -7
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +10 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +12 -17
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +2 -2
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.d.ts +1 -1
- package/dist/opProperties.d.ts.map +1 -1
- package/dist/opProperties.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/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts +2 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js.map +1 -1
- package/dist/storageServiceWithAttachBlobs.js.map +1 -1
- package/dist/summary/documentSchema.js +1 -1
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +1 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +4 -2
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +35 -13
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -6
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +22 -108
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +1 -1
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +4 -1
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +2 -2
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +3 -3
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +16 -16
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -3
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +17 -29
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -1
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +11 -11
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -3
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +2 -2
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +7 -8
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +26 -22
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.js.map +1 -1
- package/dist/throttler.js.map +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +4 -4
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +1 -1
- package/lib/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +3 -3
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +3 -3
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +2 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +2 -2
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +2 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +12 -19
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +68 -114
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +7 -8
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +3 -3
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +4 -3
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +2 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +1 -3
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +18 -21
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +12 -31
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +3 -30
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +0 -2
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +2 -3
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcReferenceGraphAlgorithm.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts.map +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +2 -35
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +4 -57
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +2 -2
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/gcUnreferencedStateTracker.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/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/messageTypes.d.ts +1 -1
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +2 -2
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +11 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +13 -2
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +10 -3
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +7 -0
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +4 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +12 -7
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +10 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +12 -17
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.d.ts +1 -1
- package/lib/opProperties.d.ts.map +1 -1
- package/lib/opProperties.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/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts +2 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js.map +1 -1
- package/lib/storageServiceWithAttachBlobs.js.map +1 -1
- package/lib/summary/documentSchema.js +1 -1
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +1 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +4 -2
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +35 -13
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +1 -6
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +21 -107
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +1 -1
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +4 -1
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +3 -3
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +14 -14
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +2 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +17 -29
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +3 -3
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -3
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +2 -2
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +7 -8
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +25 -21
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.js.map +1 -1
- package/lib/throttler.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +72 -24
- package/src/batchTracker.ts +1 -1
- package/src/blobManager.ts +7 -7
- package/src/channelCollection.ts +8 -9
- package/src/connectionTelemetry.ts +14 -6
- package/src/containerHandleContext.ts +2 -1
- package/src/containerRuntime.ts +88 -141
- package/src/dataStore.ts +2 -1
- package/src/dataStoreContext.ts +16 -17
- package/src/deltaManagerProxies.ts +7 -5
- package/src/deltaScheduler.ts +2 -1
- package/src/gc/garbageCollection.md +0 -8
- package/src/gc/garbageCollection.ts +20 -25
- package/src/gc/gcConfigs.ts +8 -34
- package/src/gc/gcDefinitions.ts +4 -31
- package/src/gc/gcHelpers.ts +2 -2
- package/src/gc/gcSummaryDefinitions.ts +1 -1
- package/src/gc/gcSummaryStateTracker.ts +7 -73
- package/src/gc/gcTelemetry.ts +2 -2
- package/src/gc/index.ts +0 -1
- package/src/index.ts +1 -1
- package/src/messageTypes.ts +1 -1
- package/src/opLifecycle/README.md +120 -160
- package/src/opLifecycle/definitions.ts +2 -2
- package/src/opLifecycle/opCompressor.ts +13 -2
- package/src/opLifecycle/opDecompressor.ts +1 -1
- package/src/opLifecycle/opGroupingManager.ts +11 -4
- package/src/opLifecycle/opSplitter.ts +13 -8
- package/src/opLifecycle/outbox.ts +12 -27
- package/src/opLifecycle/remoteMessageProcessor.ts +2 -1
- package/src/opProperties.ts +2 -4
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +1 -1
- package/src/scheduleManager.ts +2 -1
- package/src/summary/index.ts +1 -1
- package/src/summary/orderedClientElection.ts +83 -12
- package/src/summary/runningSummarizer.ts +31 -115
- package/src/summary/summarizer.ts +5 -2
- package/src/summary/summarizerClientElection.ts +2 -1
- package/src/summary/summarizerNode/summarizerNode.ts +19 -31
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +2 -1
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +4 -8
- package/src/summary/summarizerTypes.ts +22 -33
- package/src/summary/summaryCollection.ts +2 -2
- package/src/summary/summaryFormat.ts +9 -7
- package/src/summary/summaryGenerator.ts +51 -29
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import { IRequest } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { assert, LazyPromise, Timer } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import { IGarbageCollectionData, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
9
8
|
import {
|
|
10
9
|
IGarbageCollectionDetailsBase,
|
|
11
10
|
ISummarizeResult,
|
|
12
11
|
gcTreeKey,
|
|
12
|
+
type IGarbageCollectionData,
|
|
13
|
+
type ITelemetryContext,
|
|
13
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
14
15
|
import { createResponseError, responseToException } from "@fluidframework/runtime-utils/internal";
|
|
15
16
|
import {
|
|
@@ -95,7 +96,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
95
96
|
private readonly configs: IGarbageCollectorConfigs;
|
|
96
97
|
|
|
97
98
|
public get shouldRunGC(): boolean {
|
|
98
|
-
return this.configs.
|
|
99
|
+
return this.configs.gcEnabled;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
public readonly sessionExpiryTimerStarted: number | undefined;
|
|
@@ -158,10 +159,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
158
159
|
|
|
159
160
|
private readonly submitMessage: (message: ContainerRuntimeGCMessage) => void;
|
|
160
161
|
|
|
161
|
-
public get summaryStateNeedsReset(): boolean {
|
|
162
|
-
return this.summaryStateTracker.doesSummaryStateNeedReset;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
162
|
/** Returns the count of data stores whose GC state updated since the last summary. */
|
|
166
163
|
public get updatedDSCountSinceLastSummary(): number {
|
|
167
164
|
return this.summaryStateTracker.updatedDSCountSinceLastSummary;
|
|
@@ -216,10 +213,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
216
213
|
this.sessionExpiryTimerStarted = Date.now();
|
|
217
214
|
}
|
|
218
215
|
|
|
219
|
-
this.summaryStateTracker = new GCSummaryStateTracker(
|
|
220
|
-
this.configs,
|
|
221
|
-
baseSnapshot?.trees[gcTreeKey] !== undefined /* wasGCRunInBaseSnapshot */,
|
|
222
|
-
);
|
|
216
|
+
this.summaryStateTracker = new GCSummaryStateTracker(this.configs);
|
|
223
217
|
|
|
224
218
|
this.telemetryTracker = new GCTelemetryTracker(
|
|
225
219
|
this.mc,
|
|
@@ -333,6 +327,10 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
333
327
|
return {};
|
|
334
328
|
}
|
|
335
329
|
|
|
330
|
+
// Note that the base GC details are returned even if GC is disabled. This is to handle the special scenario
|
|
331
|
+
// where GC is disabled but GC state exists in base snapshot. In this scenario, the nodes which get the GC
|
|
332
|
+
// state will re-summarize to reset any GC specific state in their summaries (like unreferenced flag).
|
|
333
|
+
|
|
336
334
|
const gcNodes: { [id: string]: string[] } = {};
|
|
337
335
|
for (const [nodeId, nodeData] of Object.entries(baseSnapshotData.gcState.gcNodes)) {
|
|
338
336
|
gcNodes[nodeId] = Array.from(nodeData.outboundRoutes);
|
|
@@ -373,7 +371,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
373
371
|
return;
|
|
374
372
|
}
|
|
375
373
|
|
|
376
|
-
// Initialize the deleted nodes from the snapshot. This is done irrespective of whether sweep is enabled
|
|
374
|
+
// Initialize the deleted nodes from the snapshot. This is done irrespective of whether GC / sweep is enabled
|
|
377
375
|
// to identify deleted nodes' usage.
|
|
378
376
|
if (baseSnapshotData.deletedNodes !== undefined) {
|
|
379
377
|
this.deletedNodes = new Set(baseSnapshotData.deletedNodes);
|
|
@@ -439,7 +437,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
439
437
|
* with an older reference timestamp. So, doing this on every connection will keep the unreferenced state
|
|
440
438
|
* tracking up-to-date.
|
|
441
439
|
*/
|
|
442
|
-
if (connected && this.
|
|
440
|
+
if (connected && this.shouldRunGC) {
|
|
443
441
|
this.initializeOrUpdateGCState().catch((error) => {
|
|
444
442
|
this.mc.logger.sendErrorEvent(
|
|
445
443
|
{
|
|
@@ -479,8 +477,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
479
477
|
const fullGC =
|
|
480
478
|
options.fullGC ??
|
|
481
479
|
(this.configs.runFullGC === true ||
|
|
482
|
-
this.summaryStateTracker.autoRecovery.fullGCRequested()
|
|
483
|
-
this.summaryStateTracker.doesSummaryStateNeedReset);
|
|
480
|
+
this.summaryStateTracker.autoRecovery.fullGCRequested());
|
|
484
481
|
|
|
485
482
|
// Add the options that are used to run GC to the telemetry context.
|
|
486
483
|
telemetryContext?.setMultiple("fluid_GC", "Options", {
|
|
@@ -488,14 +485,12 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
488
485
|
runSweep: options.runSweep,
|
|
489
486
|
});
|
|
490
487
|
|
|
491
|
-
const logger =
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
})
|
|
498
|
-
: this.mc.logger;
|
|
488
|
+
const logger = createChildLogger({
|
|
489
|
+
logger: options.logger ?? this.mc.logger,
|
|
490
|
+
properties: {
|
|
491
|
+
all: { completedGCRuns: this.completedRuns, fullGC },
|
|
492
|
+
},
|
|
493
|
+
});
|
|
499
494
|
|
|
500
495
|
/**
|
|
501
496
|
* If there is no current reference timestamp, skip running GC. We need the current timestamp to track
|
|
@@ -854,7 +849,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
854
849
|
trackState: boolean,
|
|
855
850
|
telemetryContext?: ITelemetryContext,
|
|
856
851
|
): ISummarizeResult | undefined {
|
|
857
|
-
if (!this.
|
|
852
|
+
if (!this.shouldRunGC || this.gcDataFromLastRun === undefined) {
|
|
858
853
|
return;
|
|
859
854
|
}
|
|
860
855
|
|
|
@@ -997,7 +992,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
997
992
|
request,
|
|
998
993
|
headerData,
|
|
999
994
|
}: IGCNodeUpdatedProps) {
|
|
1000
|
-
if (!this.
|
|
995
|
+
if (!this.shouldRunGC) {
|
|
1001
996
|
return;
|
|
1002
997
|
}
|
|
1003
998
|
|
|
@@ -1106,7 +1101,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1106
1101
|
* @param autorecovery - This reference is added artificially, for autorecovery. Used for logging.
|
|
1107
1102
|
*/
|
|
1108
1103
|
public addedOutboundReference(fromNodePath: string, toNodePath: string, autorecovery?: true) {
|
|
1109
|
-
if (!this.
|
|
1104
|
+
if (!this.shouldRunGC) {
|
|
1110
1105
|
return;
|
|
1111
1106
|
}
|
|
1112
1107
|
|
package/src/gc/gcConfigs.ts
CHANGED
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
gcTestModeKey,
|
|
29
29
|
maxSnapshotCacheExpiryMs,
|
|
30
30
|
oneDayMs,
|
|
31
|
-
runGCKey,
|
|
32
31
|
runSessionExpiryKey,
|
|
33
32
|
runSweepKey,
|
|
34
33
|
throwOnTombstoneLoadOverrideKey,
|
|
@@ -54,7 +53,7 @@ export function generateGCConfigs(
|
|
|
54
53
|
isSummarizerClient: boolean;
|
|
55
54
|
},
|
|
56
55
|
): IGarbageCollectorConfigs {
|
|
57
|
-
let gcEnabled: boolean;
|
|
56
|
+
let gcEnabled: boolean = true;
|
|
58
57
|
let sessionExpiryTimeoutMs: number | undefined;
|
|
59
58
|
let tombstoneTimeoutMs: number | undefined;
|
|
60
59
|
let persistedGcFeatureMatrix: GCFeatureMatrix | undefined;
|
|
@@ -70,9 +69,9 @@ export function generateGCConfigs(
|
|
|
70
69
|
if (createParams.existing) {
|
|
71
70
|
const metadata = createParams.metadata;
|
|
72
71
|
gcVersionInBaseSnapshot = getGCVersion(metadata);
|
|
73
|
-
// Existing documents which did not have metadata blob or had GC disabled have version as 0.
|
|
74
|
-
//
|
|
75
|
-
gcEnabled = gcVersionInBaseSnapshot
|
|
72
|
+
// Existing documents which did not have metadata blob or had GC disabled have GC version as 0. GC will be
|
|
73
|
+
// disabled for these documents.
|
|
74
|
+
gcEnabled = gcVersionInBaseSnapshot !== 0;
|
|
76
75
|
sessionExpiryTimeoutMs = metadata?.sessionExpiryTimeoutMs;
|
|
77
76
|
const legacyPersistedSweepTimeoutMs = (metadata as IGCMetadata_Deprecated)?.sweepTimeoutMs;
|
|
78
77
|
tombstoneTimeoutMs =
|
|
@@ -86,12 +85,8 @@ export function generateGCConfigs(
|
|
|
86
85
|
"Fluid.GarbageCollection.TestOverride.TombstoneTimeoutMs",
|
|
87
86
|
);
|
|
88
87
|
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
gcEnabled = createParams.gcOptions.gcAllowed !== false;
|
|
92
|
-
|
|
93
|
-
// Set the Session Expiry if GC is enabled and session expiry flag isn't explicitly set to false.
|
|
94
|
-
if (gcEnabled && mc.config.getBoolean(runSessionExpiryKey) !== false) {
|
|
88
|
+
// Set the Session Expiry if session expiry flag isn't explicitly set to false.
|
|
89
|
+
if (mc.config.getBoolean(runSessionExpiryKey) !== false) {
|
|
95
90
|
sessionExpiryTimeoutMs =
|
|
96
91
|
createParams.gcOptions.sessionExpiryTimeoutMs ?? defaultSessionExpiryDurationMs;
|
|
97
92
|
}
|
|
@@ -112,26 +107,6 @@ export function generateGCConfigs(
|
|
|
112
107
|
createParams.gcOptions[gcGenerationOptionName] /* currentGeneration */,
|
|
113
108
|
);
|
|
114
109
|
|
|
115
|
-
const gcVersionInEffect = getGCVersionInEffect(mc.config);
|
|
116
|
-
|
|
117
|
-
// The GC version is up-to-date if the GC version in effect is at least equal to the GC version in base snapshot.
|
|
118
|
-
// If it is not up-to-date, there is a newer version of GC out there which is more reliable than this. So, GC
|
|
119
|
-
// should not run as it may produce incorrect / unreliable state.
|
|
120
|
-
const isGCVersionUpToDate =
|
|
121
|
-
gcVersionInBaseSnapshot === undefined || gcVersionInEffect >= gcVersionInBaseSnapshot;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Whether GC should run or not. The following conditions have to be met to run sweep:
|
|
125
|
-
* 1. GC should be enabled for this container.
|
|
126
|
-
* 2. GC should not be disabled via disableGC GC option.
|
|
127
|
-
* 3. The current GC version should be greater or equal to the GC version in the base snapshot.
|
|
128
|
-
*
|
|
129
|
-
* These conditions can be overridden via the RunGC feature flag.
|
|
130
|
-
*/
|
|
131
|
-
const shouldRunGC =
|
|
132
|
-
mc.config.getBoolean(runGCKey) ??
|
|
133
|
-
(gcEnabled && !createParams.gcOptions.disableGC && isGCVersionUpToDate);
|
|
134
|
-
|
|
135
110
|
/**
|
|
136
111
|
* Whether sweep should run or not. This refers to whether Tombstones should fail on load and whether
|
|
137
112
|
* sweep-ready nodes should be deleted.
|
|
@@ -144,7 +119,7 @@ export function generateGCConfigs(
|
|
|
144
119
|
* These conditions can be overridden via the RunSweep feature flag.
|
|
145
120
|
*/
|
|
146
121
|
const sweepEnabled: boolean =
|
|
147
|
-
!
|
|
122
|
+
!gcEnabled || tombstoneTimeoutMs === undefined
|
|
148
123
|
? false
|
|
149
124
|
: mc.config.getBoolean(runSweepKey) ??
|
|
150
125
|
(sweepAllowed && createParams.gcOptions.enableGCSweep === true);
|
|
@@ -197,7 +172,6 @@ export function generateGCConfigs(
|
|
|
197
172
|
return {
|
|
198
173
|
gcEnabled, // For this document
|
|
199
174
|
sweepEnabled: sweepAllowed, // For this document (based on current GC Generation option)
|
|
200
|
-
shouldRunGC, // For this session
|
|
201
175
|
shouldRunSweep, // For this session
|
|
202
176
|
runFullGC,
|
|
203
177
|
testMode,
|
|
@@ -208,7 +182,7 @@ export function generateGCConfigs(
|
|
|
208
182
|
inactiveTimeoutMs,
|
|
209
183
|
persistedGcFeatureMatrix,
|
|
210
184
|
gcVersionInBaseSnapshot,
|
|
211
|
-
gcVersionInEffect,
|
|
185
|
+
gcVersionInEffect: getGCVersionInEffect(mc.config),
|
|
212
186
|
throwOnInactiveLoad,
|
|
213
187
|
throwOnTombstoneLoad,
|
|
214
188
|
throwOnTombstoneUsage,
|
package/src/gc/gcDefinitions.ts
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
7
7
|
import { IRequest } from "@fluidframework/core-interfaces";
|
|
8
|
-
import { ISnapshotTree } from "@fluidframework/
|
|
9
|
-
import { IGarbageCollectionData, ITelemetryContext } from "@fluidframework/runtime-definitions";
|
|
8
|
+
import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
10
9
|
import {
|
|
10
|
+
ITelemetryContext,
|
|
11
|
+
IGarbageCollectionData,
|
|
11
12
|
IGarbageCollectionDetailsBase,
|
|
12
13
|
ISummarizeResult,
|
|
13
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
@@ -59,8 +60,6 @@ export const gcDisableDataStoreSweepOptionName = "disableDataStoreSweep";
|
|
|
59
60
|
*/
|
|
60
61
|
export const gcGenerationOptionName = "gcGeneration";
|
|
61
62
|
|
|
62
|
-
/** Config key to turn GC on / off. */
|
|
63
|
-
export const runGCKey = "Fluid.GarbageCollection.RunGC";
|
|
64
63
|
/** Config key to turn GC sweep on / off. */
|
|
65
64
|
export const runSweepKey = "Fluid.GarbageCollection.RunSweep";
|
|
66
65
|
/** Config key to turn GC test mode on / off. */
|
|
@@ -333,8 +332,6 @@ export interface IGarbageCollector {
|
|
|
333
332
|
readonly sessionExpiryTimerStarted: number | undefined;
|
|
334
333
|
/** Tells whether GC should run or not. */
|
|
335
334
|
readonly shouldRunGC: boolean;
|
|
336
|
-
/** Tells whether the GC state in summary needs to be reset in the next summary. */
|
|
337
|
-
readonly summaryStateNeedsReset: boolean;
|
|
338
335
|
/** The count of data stores whose GC state updated since the last summary. */
|
|
339
336
|
readonly updatedDSCountSinceLastSummary: number;
|
|
340
337
|
/** Tells whether tombstone feature is enabled and enforced. */
|
|
@@ -421,24 +418,6 @@ export interface IGarbageCollectorCreateParams {
|
|
|
421
418
|
* @alpha
|
|
422
419
|
*/
|
|
423
420
|
export interface IGCRuntimeOptions {
|
|
424
|
-
/**
|
|
425
|
-
* Flag that if true, will enable running garbage collection (GC) for a new container.
|
|
426
|
-
*
|
|
427
|
-
* GC has mark phase and sweep phase. In mark phase, unreferenced objects are identified
|
|
428
|
-
* and marked as such in the summary. This option enables the mark phase.
|
|
429
|
-
* In sweep phase, unreferenced objects are eventually deleted from the container if they meet certain conditions.
|
|
430
|
-
* Sweep phase can be enabled using the "enableGCSweep" option.
|
|
431
|
-
*
|
|
432
|
-
* Note: This setting is persisted in the container's summary and cannot be changed.
|
|
433
|
-
*/
|
|
434
|
-
gcAllowed?: boolean;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Flag that if true, will disable garbage collection for the session.
|
|
438
|
-
* Can be used to disable running GC on containers where it is allowed via the gcAllowed option.
|
|
439
|
-
*/
|
|
440
|
-
disableGC?: boolean;
|
|
441
|
-
|
|
442
421
|
/**
|
|
443
422
|
* Flag that if true, will enable the full Sweep Phase of garbage collection for this session,
|
|
444
423
|
* where Tombstoned objects are permanently deleted from the container.
|
|
@@ -481,8 +460,7 @@ export interface IGCRuntimeOptions {
|
|
|
481
460
|
*/
|
|
482
461
|
export interface IGarbageCollectorConfigs {
|
|
483
462
|
/**
|
|
484
|
-
* Tracks if GC is enabled for this document.
|
|
485
|
-
* throughout its lifetime.
|
|
463
|
+
* Tracks if GC is enabled for this document. GC may not be enabled for old documents created pre-GC.
|
|
486
464
|
*/
|
|
487
465
|
readonly gcEnabled: boolean;
|
|
488
466
|
/**
|
|
@@ -490,11 +468,6 @@ export interface IGarbageCollectorConfigs {
|
|
|
490
468
|
* throughout its lifetime.
|
|
491
469
|
*/
|
|
492
470
|
readonly sweepEnabled: boolean;
|
|
493
|
-
/**
|
|
494
|
-
* Tracks if GC should run or not. Even if GC is enabled for a document (see gcEnabled), it can be explicitly
|
|
495
|
-
* disabled via runtime options or feature flags.
|
|
496
|
-
*/
|
|
497
|
-
readonly shouldRunGC: boolean;
|
|
498
471
|
/**
|
|
499
472
|
* Tracks if sweep phase should run or not, or if it should run only for attachment blobs.
|
|
500
473
|
* Even if the sweep phase is allowed for a document (see sweepEnabled), it may be disabled or partially enabled
|
package/src/gc/gcHelpers.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import { ISnapshotTree } from "@fluidframework/
|
|
8
|
-
import { IGarbageCollectionData } from "@fluidframework/runtime-definitions";
|
|
7
|
+
import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
9
8
|
import {
|
|
10
9
|
IGarbageCollectionDetailsBase,
|
|
11
10
|
gcBlobPrefix,
|
|
12
11
|
gcDeletedBlobKey,
|
|
13
12
|
gcTombstoneBlobKey,
|
|
13
|
+
IGarbageCollectionData,
|
|
14
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
15
15
|
import type { IConfigProvider } from "@fluidframework/telemetry-utils/internal";
|
|
16
16
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IGarbageCollectionData } from "@fluidframework/runtime-definitions";
|
|
6
|
+
import { IGarbageCollectionData } from "@fluidframework/runtime-definitions/internal";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The garbage collection data of each node in the reference graph. Each node's GC data is written in the summary
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { SummaryType } from "@fluidframework/
|
|
7
|
-
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
|
|
6
|
+
import { SummaryType } from "@fluidframework/driver-definitions";
|
|
8
7
|
import {
|
|
8
|
+
ISummaryTreeWithStats,
|
|
9
9
|
ISummarizeResult,
|
|
10
10
|
gcBlobPrefix,
|
|
11
11
|
gcDeletedBlobKey,
|
|
@@ -16,7 +16,7 @@ import { SummaryTreeBuilder, mergeStats } from "@fluidframework/runtime-utils/in
|
|
|
16
16
|
|
|
17
17
|
import { IRefreshSummaryResult } from "../summary/index.js";
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import { IGCStats, IGarbageCollectorConfigs } from "./gcDefinitions.js";
|
|
20
20
|
import { generateSortedGCState } from "./gcHelpers.js";
|
|
21
21
|
import { IGarbageCollectionSnapshotData, IGarbageCollectionState } from "./gcSummaryDefinitions.js";
|
|
22
22
|
|
|
@@ -38,17 +38,11 @@ export interface IGCSummaryTrackingData {
|
|
|
38
38
|
* On summarize, it decides whether to write new state or re-use previous summary's state.
|
|
39
39
|
*/
|
|
40
40
|
export class GCSummaryStateTracker {
|
|
41
|
-
// This is the version of GC data in the latest summary being tracked.
|
|
42
|
-
private latestSummaryGCVersion: GCVersion;
|
|
43
|
-
|
|
44
41
|
// Keeps track of the GC data from the latest summary successfully acked by the server.
|
|
45
42
|
private latestSummaryData: IGCSummaryTrackingData | undefined;
|
|
46
43
|
// Keeps track of the GC data from the last summary submitted to the server but not yet acked.
|
|
47
44
|
private pendingSummaryData: IGCSummaryTrackingData | undefined;
|
|
48
45
|
|
|
49
|
-
// Tracks whether there was GC was run in latest summary being tracked.
|
|
50
|
-
private wasGCRunInLatestSummary: boolean;
|
|
51
|
-
|
|
52
46
|
// Tracks the count of data stores whose state updated since the last summary, i.e., they went from referenced
|
|
53
47
|
// to unreferenced or vice-versa.
|
|
54
48
|
public updatedDSCountSinceLastSummary: number = 0;
|
|
@@ -69,58 +63,9 @@ export class GCSummaryStateTracker {
|
|
|
69
63
|
// Tells whether GC should run or not.
|
|
70
64
|
private readonly configs: Pick<
|
|
71
65
|
IGarbageCollectorConfigs,
|
|
72
|
-
"
|
|
66
|
+
"gcEnabled" | "tombstoneMode" | "gcVersionInBaseSnapshot" | "gcVersionInEffect"
|
|
73
67
|
>,
|
|
74
|
-
|
|
75
|
-
wasGCRunInBaseSnapshot: boolean,
|
|
76
|
-
) {
|
|
77
|
-
this.wasGCRunInLatestSummary = wasGCRunInBaseSnapshot;
|
|
78
|
-
// For existing document, the latest summary is the one that we loaded from. So, use its GC version as the
|
|
79
|
-
// latest tracked GC version. For new documents, we will be writing the first summary with the current version.
|
|
80
|
-
this.latestSummaryGCVersion =
|
|
81
|
-
this.configs.gcVersionInBaseSnapshot ?? this.configs.gcVersionInEffect;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Tells whether the GC state needs to be reset. This can happen under 3 conditions:
|
|
86
|
-
*
|
|
87
|
-
* 1. The base snapshot contains GC state but GC is disabled. This will happen the first time GC is disabled after
|
|
88
|
-
* it was enabled before. GC state needs to be removed from summary and all nodes should be marked referenced.
|
|
89
|
-
*
|
|
90
|
-
* 2. The base snapshot does not have GC state but GC is enabled. This will happen the very first time GC runs on
|
|
91
|
-
* a document and the first time GC is enabled after is was disabled before.
|
|
92
|
-
*
|
|
93
|
-
* 3. GC is enabled and the latest summary state is refreshed from a snapshot that had GC disabled and vice-versa.
|
|
94
|
-
*
|
|
95
|
-
* Note that the state will be reset only once for the first summary generated after this returns true. After that,
|
|
96
|
-
* this will return false.
|
|
97
|
-
*/
|
|
98
|
-
public get doesGCStateNeedReset(): boolean {
|
|
99
|
-
return this.wasGCRunInLatestSummary !== this.configs.shouldRunGC;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Tells whether the GC state needs to be reset in the next summary. We need to do this if:
|
|
104
|
-
*
|
|
105
|
-
* 1. GC was enabled and is now disabled. The GC state needs to be removed and everything becomes referenced.
|
|
106
|
-
*
|
|
107
|
-
* 2. GC was disabled and is now enabled. The GC state needs to be regenerated and added to summary.
|
|
108
|
-
*
|
|
109
|
-
* 3. GC is enabled and the latest summary state is refreshed from a snapshot that had GC disabled and vice-versa.
|
|
110
|
-
*
|
|
111
|
-
* 4. The GC version in the latest summary is different from the current GC version. This can happen if:
|
|
112
|
-
*
|
|
113
|
-
* 4.1. The summary this client loaded with has data from a different GC version.
|
|
114
|
-
*
|
|
115
|
-
* 4.2. This client's latest summary was updated from a snapshot that has a different GC version.
|
|
116
|
-
*/
|
|
117
|
-
public get doesSummaryStateNeedReset(): boolean {
|
|
118
|
-
return (
|
|
119
|
-
this.doesGCStateNeedReset ||
|
|
120
|
-
(this.configs.shouldRunGC &&
|
|
121
|
-
this.latestSummaryGCVersion !== this.configs.gcVersionInEffect)
|
|
122
|
-
);
|
|
123
|
-
}
|
|
68
|
+
) {}
|
|
124
69
|
|
|
125
70
|
/**
|
|
126
71
|
* Called during GC initialization. Initialize the latest summary data from the base snapshot data.
|
|
@@ -152,7 +97,7 @@ export class GCSummaryStateTracker {
|
|
|
152
97
|
deletedNodes: Set<string>,
|
|
153
98
|
tombstones: string[],
|
|
154
99
|
): ISummarizeResult | undefined {
|
|
155
|
-
if (!this.configs.
|
|
100
|
+
if (!this.configs.gcEnabled) {
|
|
156
101
|
return;
|
|
157
102
|
}
|
|
158
103
|
|
|
@@ -283,25 +228,14 @@ export class GCSummaryStateTracker {
|
|
|
283
228
|
* Called to refresh the latest summary state. This happens when a pending summary is acked.
|
|
284
229
|
*/
|
|
285
230
|
public async refreshLatestSummary(result: IRefreshSummaryResult): Promise<void> {
|
|
286
|
-
if (!result.isSummaryTracked) {
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// If the summary is tracked, this client is the one that generated it. So, update wasGCRunInLatestSummary.
|
|
291
|
-
// Note that this has to be updated if GC did not run too. Otherwise, `gcStateNeedsReset` will always return
|
|
292
|
-
// true in scenarios where GC is currently disabled but enabled in the snapshot we loaded from.
|
|
293
|
-
this.wasGCRunInLatestSummary = this.configs.shouldRunGC;
|
|
294
|
-
|
|
295
|
-
if (!this.configs.shouldRunGC) {
|
|
231
|
+
if (!this.configs.gcEnabled || !result.isSummaryTracked) {
|
|
296
232
|
return;
|
|
297
233
|
}
|
|
298
234
|
|
|
299
|
-
this.latestSummaryGCVersion = this.configs.gcVersionInEffect;
|
|
300
235
|
this.latestSummaryData = this.pendingSummaryData;
|
|
301
236
|
this.pendingSummaryData = undefined;
|
|
302
237
|
this.updatedDSCountSinceLastSummary = 0;
|
|
303
238
|
this.fullGCModeForAutoRecovery = false;
|
|
304
|
-
return;
|
|
305
239
|
}
|
|
306
240
|
|
|
307
241
|
/**
|
package/src/gc/gcTelemetry.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import type { Tagged } from "@fluidframework/core-interfaces";
|
|
7
|
+
import { IGarbageCollectionData } from "@fluidframework/runtime-definitions/internal";
|
|
7
8
|
import {
|
|
8
9
|
ITelemetryLoggerExt,
|
|
9
10
|
MonitoringContext,
|
|
@@ -12,7 +13,6 @@ import {
|
|
|
12
13
|
type ITelemetryGenericEventExt,
|
|
13
14
|
} from "@fluidframework/telemetry-utils/internal";
|
|
14
15
|
|
|
15
|
-
import type { Tagged } from "@fluidframework/core-interfaces";
|
|
16
16
|
import { RuntimeHeaderData } from "../containerRuntime.js";
|
|
17
17
|
import { ICreateContainerMetadata } from "../summary/index.js";
|
|
18
18
|
|
package/src/gc/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/messageTypes.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
6
7
|
import type { IdCreationRange } from "@fluidframework/id-compressor/internal";
|
|
7
|
-
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import {
|
|
9
9
|
IAttachMessage,
|
|
10
10
|
IEnvelope,
|