@fluidframework/container-runtime 2.23.0-325054 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/api-report/container-runtime.legacy.alpha.api.md +0 -246
- package/dist/blobManager/blobManager.d.ts +11 -9
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +38 -39
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.d.ts +2 -4
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.js +6 -6
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
- package/dist/channelCollection.d.ts +1 -7
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +1 -26
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +0 -43
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +21 -141
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +49 -290
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +0 -13
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +2 -25
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +2 -20
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +0 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +8 -24
- 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.map +1 -1
- package/dist/gc/gcHelpers.js +1 -4
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +0 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +4 -16
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -29
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/signalTelemetryProcessing.d.ts +33 -0
- package/dist/signalTelemetryProcessing.d.ts.map +1 -0
- package/dist/signalTelemetryProcessing.js +149 -0
- package/dist/signalTelemetryProcessing.js.map +1 -0
- package/dist/summary/documentSchema.d.ts +7 -31
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +2 -18
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +2 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +7 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +1 -3
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -3
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +2 -7
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -2
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +4 -23
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +2 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +3 -11
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +0 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +1 -1
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +109 -22
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -9
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +3 -9
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryHelpers.d.ts +19 -0
- package/dist/summary/summaryHelpers.d.ts.map +1 -0
- package/dist/summary/summaryHelpers.js +90 -0
- package/dist/summary/summaryHelpers.js.map +1 -0
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +0 -2
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +11 -9
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +37 -37
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.d.ts +2 -4
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.js +6 -6
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
- package/lib/channelCollection.d.ts +1 -7
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +2 -29
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +0 -43
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +21 -141
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +51 -298
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +0 -13
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +2 -25
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +3 -23
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +0 -2
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +8 -24
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +1 -3
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +1 -4
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +0 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +5 -19
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -29
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/signalTelemetryProcessing.d.ts +33 -0
- package/lib/signalTelemetryProcessing.d.ts.map +1 -0
- package/lib/signalTelemetryProcessing.js +145 -0
- package/lib/signalTelemetryProcessing.js.map +1 -0
- package/lib/summary/documentSchema.d.ts +7 -31
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +2 -18
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +2 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -0
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +1 -3
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -3
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +2 -7
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +1 -2
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +4 -23
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +2 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +3 -11
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +0 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +1 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +109 -22
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -9
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +3 -9
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryHelpers.d.ts +19 -0
- package/lib/summary/summaryHelpers.d.ts.map +1 -0
- package/lib/summary/summaryHelpers.js +84 -0
- package/lib/summary/summaryHelpers.js.map +1 -0
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +0 -2
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +27 -20
- package/src/blobManager/blobManager.ts +70 -62
- package/src/blobManager/blobManagerSnapSum.ts +7 -9
- package/src/channelCollection.ts +3 -31
- package/src/connectionTelemetry.ts +0 -51
- package/src/containerRuntime.ts +111 -522
- package/src/dataStoreContext.ts +2 -32
- package/src/gc/garbageCollection.ts +9 -26
- package/src/gc/gcConfigs.ts +3 -6
- package/src/gc/gcDefinitions.ts +10 -28
- package/src/gc/gcHelpers.ts +0 -5
- package/src/gc/gcSummaryStateTracker.ts +1 -2
- package/src/gc/gcTelemetry.ts +6 -13
- package/src/index.ts +6 -6
- package/src/messageTypes.ts +0 -2
- package/src/packageVersion.ts +1 -1
- package/src/signalTelemetryProcessing.ts +233 -0
- package/src/summary/documentSchema.ts +7 -38
- package/src/summary/index.ts +12 -0
- package/src/summary/orderedClientElection.ts +1 -3
- package/src/summary/runWhileConnectedCoordinator.ts +3 -8
- package/src/summary/runningSummarizer.ts +12 -20
- package/src/summary/summarizer.ts +6 -18
- package/src/summary/summarizerClientElection.ts +0 -2
- package/src/summary/summarizerHeuristics.ts +1 -2
- package/src/summary/summarizerTypes.ts +119 -23
- package/src/summary/summaryFormat.ts +4 -13
- package/src/summary/summaryGenerator.ts +1 -8
- package/src/summary/summaryHelpers.ts +118 -0
- package/src/summary/summaryManager.ts +0 -2
package/src/dataStoreContext.ts
CHANGED
|
@@ -604,30 +604,6 @@ export abstract class FluidDataStoreContext
|
|
|
604
604
|
this.channel!.setConnectionState(connected, clientId);
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
-
/**
|
|
608
|
-
* back-compat ADO 21575: This is temporary and will be removed once the compat requirement across Runtime and
|
|
609
|
-
* Datastore boundary is satisfied.
|
|
610
|
-
* Process the messages to maintain backwards compatibility. The `processMessages` function is added to
|
|
611
|
-
* IFluidDataStoreChannel in 2.5.0. For channels before that, call `process` for each message.
|
|
612
|
-
*/
|
|
613
|
-
private processMessagesCompat(
|
|
614
|
-
channel: IFluidDataStoreChannel,
|
|
615
|
-
messageCollection: IRuntimeMessageCollection,
|
|
616
|
-
): void {
|
|
617
|
-
if (channel.processMessages === undefined) {
|
|
618
|
-
const { envelope, messagesContent, local } = messageCollection;
|
|
619
|
-
for (const { contents, localOpMetadata, clientSequenceNumber } of messagesContent) {
|
|
620
|
-
channel.process(
|
|
621
|
-
{ ...envelope, contents, clientSequenceNumber },
|
|
622
|
-
local,
|
|
623
|
-
localOpMetadata,
|
|
624
|
-
);
|
|
625
|
-
}
|
|
626
|
-
} else {
|
|
627
|
-
channel.processMessages(messageCollection);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
607
|
/**
|
|
632
608
|
* Process messages for this data store. The messages here are contiguous messages for this data store in a batch.
|
|
633
609
|
* @param messageCollection - The collection of messages to process.
|
|
@@ -643,7 +619,7 @@ export abstract class FluidDataStoreContext
|
|
|
643
619
|
|
|
644
620
|
if (this.loaded) {
|
|
645
621
|
assert(this.channel !== undefined, 0xa68 /* Channel is not loaded */);
|
|
646
|
-
this.
|
|
622
|
+
this.channel.processMessages(messageCollection);
|
|
647
623
|
} else {
|
|
648
624
|
assert(!local, 0x142 /* "local store channel is not loaded" */);
|
|
649
625
|
assert(
|
|
@@ -849,12 +825,6 @@ export abstract class FluidDataStoreContext
|
|
|
849
825
|
}
|
|
850
826
|
}
|
|
851
827
|
|
|
852
|
-
/**
|
|
853
|
-
* Submits the signal to be sent to other clients.
|
|
854
|
-
* @param type - Type of the signal.
|
|
855
|
-
* @param content - Content of the signal. Should be a JSON serializable object or primitive.
|
|
856
|
-
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
857
|
-
*/
|
|
858
828
|
public submitSignal(type: string, content: unknown, targetClientId?: string): void {
|
|
859
829
|
this.verifyNotClosed("submitSignal");
|
|
860
830
|
|
|
@@ -881,7 +851,7 @@ export abstract class FluidDataStoreContext
|
|
|
881
851
|
for (const messageCollection of this.pendingMessagesState.messageCollections) {
|
|
882
852
|
// Only process ops whose seq number is greater than snapshot sequence number from which it loaded.
|
|
883
853
|
if (messageCollection.envelope.sequenceNumber > baseSequenceNumber) {
|
|
884
|
-
|
|
854
|
+
channel.processMessages(messageCollection);
|
|
885
855
|
}
|
|
886
856
|
}
|
|
887
857
|
|
|
@@ -34,22 +34,17 @@ import { IRefreshSummaryResult } from "../summary/index.js";
|
|
|
34
34
|
|
|
35
35
|
import { generateGCConfigs } from "./gcConfigs.js";
|
|
36
36
|
import {
|
|
37
|
-
// eslint-disable-next-line import/no-deprecated
|
|
38
37
|
GCNodeType,
|
|
39
38
|
GarbageCollectionMessage,
|
|
40
39
|
GarbageCollectionMessageType,
|
|
41
|
-
// eslint-disable-next-line import/no-deprecated
|
|
42
40
|
IGCMetadata,
|
|
43
41
|
IGCResult,
|
|
44
|
-
// eslint-disable-next-line import/no-deprecated
|
|
45
42
|
IGCStats,
|
|
46
43
|
IGarbageCollectionRuntime,
|
|
47
44
|
IGarbageCollector,
|
|
48
45
|
IGarbageCollectorConfigs,
|
|
49
46
|
IGarbageCollectorCreateParams,
|
|
50
|
-
// eslint-disable-next-line import/no-deprecated
|
|
51
47
|
IMarkPhaseStats,
|
|
52
|
-
// eslint-disable-next-line import/no-deprecated
|
|
53
48
|
ISweepPhaseStats,
|
|
54
49
|
UnreferencedState,
|
|
55
50
|
type IGCNodeUpdatedProps,
|
|
@@ -516,7 +511,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
516
511
|
fullGC?: boolean;
|
|
517
512
|
},
|
|
518
513
|
telemetryContext?: ITelemetryContext,
|
|
519
|
-
// eslint-disable-next-line import/no-deprecated
|
|
520
514
|
): Promise<IGCStats | undefined> {
|
|
521
515
|
const fullGC =
|
|
522
516
|
options.fullGC ?? (this.configs.runFullGC === true || this.autoRecovery.useFullGC());
|
|
@@ -614,7 +608,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
614
608
|
fullGC: boolean,
|
|
615
609
|
currentReferenceTimestampMs: number,
|
|
616
610
|
logger: ITelemetryLoggerExt,
|
|
617
|
-
// eslint-disable-next-line import/no-deprecated
|
|
618
611
|
): Promise<IGCStats> {
|
|
619
612
|
// 1. Generate / analyze the runtime's reference graph.
|
|
620
613
|
// Get the reference graph (gcData) and run GC algorithm to get referenced / unreferenced nodes.
|
|
@@ -770,7 +763,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
770
763
|
// local state when processing the op.
|
|
771
764
|
const sweepReadyDSAndBlobs = nodesToDelete.filter((nodeId) => {
|
|
772
765
|
const nodeType = this.runtime.getNodeType(nodeId);
|
|
773
|
-
|
|
766
|
+
|
|
774
767
|
return nodeType === GCNodeType.DataStore || nodeType === GCNodeType.Blob;
|
|
775
768
|
});
|
|
776
769
|
const contents: GarbageCollectionMessage = {
|
|
@@ -902,7 +895,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
902
895
|
);
|
|
903
896
|
}
|
|
904
897
|
|
|
905
|
-
// eslint-disable-next-line import/no-deprecated
|
|
906
898
|
public getMetadata(): IGCMetadata {
|
|
907
899
|
return {
|
|
908
900
|
/**
|
|
@@ -1065,7 +1057,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1065
1057
|
// Unless this is a Loaded event for a Blob or DataStore, we're done after telemetry tracking
|
|
1066
1058
|
const loadedBlobOrDataStore =
|
|
1067
1059
|
reason === "Loaded" &&
|
|
1068
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1069
1060
|
(nodeType === GCNodeType.Blob || nodeType === GCNodeType.DataStore);
|
|
1070
1061
|
if (!loadedBlobOrDataStore) {
|
|
1071
1062
|
return;
|
|
@@ -1193,9 +1184,8 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1193
1184
|
* @param gcResult - The result of the current GC run.
|
|
1194
1185
|
* @returns the stats of the mark phase run.
|
|
1195
1186
|
*/
|
|
1196
|
-
|
|
1187
|
+
|
|
1197
1188
|
private getMarkPhaseStats(gcResult: IGCResult): IMarkPhaseStats {
|
|
1198
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1199
1189
|
const markPhaseStats: IMarkPhaseStats = {
|
|
1200
1190
|
nodeCount: 0,
|
|
1201
1191
|
dataStoreCount: 0,
|
|
@@ -1222,7 +1212,6 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1222
1212
|
markPhaseStats.unrefNodeCount++;
|
|
1223
1213
|
}
|
|
1224
1214
|
|
|
1225
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1226
1215
|
if (this.runtime.getNodeType(nodeId) === GCNodeType.DataStore) {
|
|
1227
1216
|
markPhaseStats.dataStoreCount++;
|
|
1228
1217
|
if (stateUpdated) {
|
|
@@ -1232,7 +1221,7 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1232
1221
|
markPhaseStats.unrefDataStoreCount++;
|
|
1233
1222
|
}
|
|
1234
1223
|
}
|
|
1235
|
-
|
|
1224
|
+
|
|
1236
1225
|
if (this.runtime.getNodeType(nodeId) === GCNodeType.Blob) {
|
|
1237
1226
|
markPhaseStats.attachmentBlobCount++;
|
|
1238
1227
|
if (stateUpdated) {
|
|
@@ -1266,13 +1255,12 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1266
1255
|
private getSweepPhaseStats(
|
|
1267
1256
|
deletedNodes: Set<string>,
|
|
1268
1257
|
sweepReadyNodes: Set<string>,
|
|
1269
|
-
|
|
1258
|
+
|
|
1270
1259
|
markPhaseStats: IMarkPhaseStats,
|
|
1271
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1272
1260
|
): ISweepPhaseStats {
|
|
1273
1261
|
// Initialize the life time node counts to the mark phase node counts. If sweep is not enabled,
|
|
1274
1262
|
// these will be the life time node count for this container.
|
|
1275
|
-
|
|
1263
|
+
|
|
1276
1264
|
const sweepPhaseStats: ISweepPhaseStats = {
|
|
1277
1265
|
lifetimeNodeCount: markPhaseStats.nodeCount,
|
|
1278
1266
|
lifetimeDataStoreCount: markPhaseStats.dataStoreCount,
|
|
@@ -1284,32 +1272,28 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1284
1272
|
|
|
1285
1273
|
// The runtime can't reliably identify the type of deleted nodes. So, get the type here. This should
|
|
1286
1274
|
// be good enough because the only types that participate in GC today are data stores, DDSes and blobs.
|
|
1287
|
-
// eslint-disable-next-line
|
|
1275
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping
|
|
1288
1276
|
const getDeletedNodeType = (nodeId: string): GCNodeType => {
|
|
1289
1277
|
const pathParts = nodeId.split("/");
|
|
1290
1278
|
if (pathParts[1] === blobManagerBasePath) {
|
|
1291
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1292
1279
|
return GCNodeType.Blob;
|
|
1293
1280
|
}
|
|
1294
1281
|
if (pathParts.length === 2) {
|
|
1295
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1296
1282
|
return GCNodeType.DataStore;
|
|
1297
1283
|
}
|
|
1298
1284
|
if (pathParts.length === 3) {
|
|
1299
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1300
1285
|
return GCNodeType.SubDataStore;
|
|
1301
1286
|
}
|
|
1302
|
-
|
|
1287
|
+
|
|
1303
1288
|
return GCNodeType.Other;
|
|
1304
1289
|
};
|
|
1305
1290
|
|
|
1306
1291
|
for (const nodeId of deletedNodes) {
|
|
1307
1292
|
sweepPhaseStats.deletedNodeCount++;
|
|
1308
1293
|
const nodeType = getDeletedNodeType(nodeId);
|
|
1309
|
-
|
|
1294
|
+
|
|
1310
1295
|
if (nodeType === GCNodeType.DataStore) {
|
|
1311
1296
|
sweepPhaseStats.deletedDataStoreCount++;
|
|
1312
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1313
1297
|
} else if (nodeType === GCNodeType.Blob) {
|
|
1314
1298
|
sweepPhaseStats.deletedAttachmentBlobCount++;
|
|
1315
1299
|
}
|
|
@@ -1330,10 +1314,9 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
1330
1314
|
for (const nodeId of sweepReadyNodes) {
|
|
1331
1315
|
sweepPhaseStats.deletedNodeCount++;
|
|
1332
1316
|
const nodeType = this.runtime.getNodeType(nodeId);
|
|
1333
|
-
|
|
1317
|
+
|
|
1334
1318
|
if (nodeType === GCNodeType.DataStore) {
|
|
1335
1319
|
sweepPhaseStats.deletedDataStoreCount++;
|
|
1336
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1337
1320
|
} else if (nodeType === GCNodeType.Blob) {
|
|
1338
1321
|
sweepPhaseStats.deletedAttachmentBlobCount++;
|
|
1339
1322
|
}
|
package/src/gc/gcConfigs.ts
CHANGED
|
@@ -9,13 +9,10 @@ import {
|
|
|
9
9
|
validatePrecondition,
|
|
10
10
|
} from "@fluidframework/telemetry-utils/internal";
|
|
11
11
|
|
|
12
|
-
// eslint-disable-next-line import/no-deprecated
|
|
13
12
|
import { IContainerRuntimeMetadata } from "../summary/index.js";
|
|
14
13
|
|
|
15
14
|
import {
|
|
16
|
-
// eslint-disable-next-line import/no-deprecated
|
|
17
15
|
GCFeatureMatrix,
|
|
18
|
-
// eslint-disable-next-line import/no-deprecated
|
|
19
16
|
GCVersion,
|
|
20
17
|
IGCMetadata_Deprecated,
|
|
21
18
|
IGCRuntimeOptions,
|
|
@@ -45,7 +42,7 @@ export function generateGCConfigs(
|
|
|
45
42
|
mc: MonitoringContext,
|
|
46
43
|
createParams: {
|
|
47
44
|
gcOptions: IGCRuntimeOptions;
|
|
48
|
-
|
|
45
|
+
|
|
49
46
|
metadata: IContainerRuntimeMetadata | undefined;
|
|
50
47
|
existing: boolean;
|
|
51
48
|
isSummarizerClient: boolean;
|
|
@@ -54,9 +51,9 @@ export function generateGCConfigs(
|
|
|
54
51
|
let gcAllowed: boolean = true;
|
|
55
52
|
let sessionExpiryTimeoutMs: number | undefined;
|
|
56
53
|
let tombstoneTimeoutMs: number | undefined;
|
|
57
|
-
|
|
54
|
+
|
|
58
55
|
let persistedGcFeatureMatrix: GCFeatureMatrix | undefined;
|
|
59
|
-
|
|
56
|
+
|
|
60
57
|
let gcVersionInBaseSnapshot: GCVersion | undefined;
|
|
61
58
|
|
|
62
59
|
/**
|
package/src/gc/gcDefinitions.ts
CHANGED
|
@@ -21,17 +21,13 @@ import {
|
|
|
21
21
|
import { RuntimeHeaderData } from "../containerRuntime.js";
|
|
22
22
|
import { ContainerRuntimeGCMessage } from "../messageTypes.js";
|
|
23
23
|
import {
|
|
24
|
-
// eslint-disable-next-line import/no-deprecated
|
|
25
24
|
IContainerRuntimeMetadata,
|
|
26
|
-
// eslint-disable-next-line import/no-deprecated
|
|
27
25
|
ICreateContainerMetadata,
|
|
28
26
|
IRefreshSummaryResult,
|
|
29
27
|
} from "../summary/index.js";
|
|
30
28
|
|
|
31
29
|
/**
|
|
32
|
-
* @
|
|
33
|
-
* @alpha
|
|
34
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
30
|
+
* @internal
|
|
35
31
|
*/
|
|
36
32
|
export type GCVersion = number;
|
|
37
33
|
|
|
@@ -92,9 +88,7 @@ export const defaultSweepGracePeriodMs = 1 * oneDayMs; // 1 day
|
|
|
92
88
|
|
|
93
89
|
/**
|
|
94
90
|
* @see IGCMetadata.gcFeatureMatrix and @see gcGenerationOptionName
|
|
95
|
-
* @
|
|
96
|
-
* @alpha
|
|
97
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
91
|
+
* @internal
|
|
98
92
|
*/
|
|
99
93
|
export type GCFeatureMatrix =
|
|
100
94
|
| {
|
|
@@ -133,9 +127,7 @@ export interface IGCMetadata_Deprecated {
|
|
|
133
127
|
/**
|
|
134
128
|
* GC-specific metadata to be written into the summary.
|
|
135
129
|
*
|
|
136
|
-
* @
|
|
137
|
-
* @alpha
|
|
138
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
130
|
+
* @internal
|
|
139
131
|
*/
|
|
140
132
|
export interface IGCMetadata {
|
|
141
133
|
/**
|
|
@@ -184,9 +176,7 @@ export interface IGCMetadata {
|
|
|
184
176
|
|
|
185
177
|
/**
|
|
186
178
|
* The statistics of the system state after a garbage collection mark phase run.
|
|
187
|
-
* @
|
|
188
|
-
* @alpha
|
|
189
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
179
|
+
* @internal
|
|
190
180
|
*/
|
|
191
181
|
export interface IMarkPhaseStats {
|
|
192
182
|
/**
|
|
@@ -229,9 +219,7 @@ export interface IMarkPhaseStats {
|
|
|
229
219
|
|
|
230
220
|
/**
|
|
231
221
|
* The statistics of the system state after a garbage collection sweep phase run.
|
|
232
|
-
* @
|
|
233
|
-
* @alpha
|
|
234
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
222
|
+
* @internal
|
|
235
223
|
*/
|
|
236
224
|
export interface ISweepPhaseStats {
|
|
237
225
|
/**
|
|
@@ -262,17 +250,13 @@ export interface ISweepPhaseStats {
|
|
|
262
250
|
|
|
263
251
|
/**
|
|
264
252
|
* The statistics of the system state after a garbage collection run.
|
|
265
|
-
* @
|
|
266
|
-
* @alpha
|
|
267
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
253
|
+
* @internal
|
|
268
254
|
*/
|
|
269
255
|
export interface IGCStats extends IMarkPhaseStats, ISweepPhaseStats {}
|
|
270
256
|
|
|
271
257
|
/**
|
|
272
258
|
* The types of GC nodes in the GC reference graph.
|
|
273
|
-
* @
|
|
274
|
-
* @alpha
|
|
275
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
259
|
+
* @internal
|
|
276
260
|
*/
|
|
277
261
|
export const GCNodeType = {
|
|
278
262
|
// Nodes that are for data stores.
|
|
@@ -286,9 +270,7 @@ export const GCNodeType = {
|
|
|
286
270
|
} as const;
|
|
287
271
|
|
|
288
272
|
/**
|
|
289
|
-
* @
|
|
290
|
-
* @alpha
|
|
291
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
273
|
+
* @internal
|
|
292
274
|
*/
|
|
293
275
|
export type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];
|
|
294
276
|
|
|
@@ -512,9 +494,9 @@ export interface IGarbageCollectorCreateParams {
|
|
|
512
494
|
readonly gcOptions: IGCRuntimeOptions;
|
|
513
495
|
readonly baseLogger: ITelemetryLoggerExt;
|
|
514
496
|
readonly existing: boolean;
|
|
515
|
-
|
|
497
|
+
|
|
516
498
|
readonly metadata: IContainerRuntimeMetadata | undefined;
|
|
517
|
-
|
|
499
|
+
|
|
518
500
|
readonly createContainerMetadata: ICreateContainerMetadata;
|
|
519
501
|
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
520
502
|
readonly isSummarizerClient: boolean;
|
package/src/gc/gcHelpers.ts
CHANGED
|
@@ -15,11 +15,8 @@ import {
|
|
|
15
15
|
import type { IConfigProvider } from "@fluidframework/telemetry-utils/internal";
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
-
// eslint-disable-next-line import/no-deprecated
|
|
19
18
|
GCFeatureMatrix,
|
|
20
|
-
// eslint-disable-next-line import/no-deprecated
|
|
21
19
|
GCVersion,
|
|
22
|
-
// eslint-disable-next-line import/no-deprecated
|
|
23
20
|
IGCMetadata,
|
|
24
21
|
gcVersionUpgradeToV4Key,
|
|
25
22
|
nextGCVersion,
|
|
@@ -31,7 +28,6 @@ import {
|
|
|
31
28
|
IGarbageCollectionState,
|
|
32
29
|
} from "./gcSummaryDefinitions.js";
|
|
33
30
|
|
|
34
|
-
// eslint-disable-next-line import/no-deprecated
|
|
35
31
|
export function getGCVersion(metadata?: IGCMetadata): GCVersion {
|
|
36
32
|
if (!metadata) {
|
|
37
33
|
// Force to 0/disallowed in prior versions
|
|
@@ -67,7 +63,6 @@ export function getGCVersionInEffect(configProvider: IConfigProvider): number {
|
|
|
67
63
|
* @returns true if GC Sweep should be allowed for this document
|
|
68
64
|
*/
|
|
69
65
|
export function shouldAllowGcSweep(
|
|
70
|
-
// eslint-disable-next-line import/no-deprecated
|
|
71
66
|
featureMatrix: GCFeatureMatrix,
|
|
72
67
|
currentGeneration: number | undefined,
|
|
73
68
|
): boolean {
|
|
@@ -16,7 +16,6 @@ import { SummaryTreeBuilder, mergeStats } from "@fluidframework/runtime-utils/in
|
|
|
16
16
|
|
|
17
17
|
import { IRefreshSummaryResult } from "../summary/index.js";
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line import/no-deprecated
|
|
20
19
|
import { IGCStats, IGarbageCollectorConfigs } from "./gcDefinitions.js";
|
|
21
20
|
import { generateSortedGCState } from "./gcHelpers.js";
|
|
22
21
|
import {
|
|
@@ -231,7 +230,7 @@ export class GCSummaryStateTracker {
|
|
|
231
230
|
/**
|
|
232
231
|
* Called to update the state from a GC run's stats. Used to update the count of data stores whose state updated.
|
|
233
232
|
*/
|
|
234
|
-
|
|
233
|
+
|
|
235
234
|
public updateStateFromGCRunStats(stats: IGCStats): void {
|
|
236
235
|
this.updatedDSCountSinceLastSummary += stats.updatedDataStoreCount;
|
|
237
236
|
}
|
package/src/gc/gcTelemetry.ts
CHANGED
|
@@ -14,13 +14,10 @@ import {
|
|
|
14
14
|
} from "@fluidframework/telemetry-utils/internal";
|
|
15
15
|
|
|
16
16
|
import { RuntimeHeaderData } from "../containerRuntime.js";
|
|
17
|
-
// eslint-disable-next-line import/no-deprecated
|
|
18
17
|
import { ICreateContainerMetadata } from "../summary/index.js";
|
|
19
18
|
|
|
20
19
|
import {
|
|
21
|
-
// eslint-disable-next-line import/no-deprecated
|
|
22
20
|
GCFeatureMatrix,
|
|
23
|
-
// eslint-disable-next-line import/no-deprecated
|
|
24
21
|
GCNodeType,
|
|
25
22
|
IGarbageCollectorConfigs,
|
|
26
23
|
UnreferencedState,
|
|
@@ -44,7 +41,7 @@ interface ICommonProps {
|
|
|
44
41
|
/**
|
|
45
42
|
* The event that is logged when unreferenced node is used after a certain time.
|
|
46
43
|
*/
|
|
47
|
-
|
|
44
|
+
|
|
48
45
|
interface IUnreferencedEventProps extends ICreateContainerMetadata, ICommonProps {
|
|
49
46
|
/**
|
|
50
47
|
* The id that GC uses to track the node. May or may not match id
|
|
@@ -56,13 +53,12 @@ interface IUnreferencedEventProps extends ICreateContainerMetadata, ICommonProps
|
|
|
56
53
|
*/
|
|
57
54
|
id: Tagged<string>;
|
|
58
55
|
fromId?: Tagged<string>;
|
|
59
|
-
|
|
56
|
+
|
|
60
57
|
type: GCNodeType;
|
|
61
58
|
unrefTime: number;
|
|
62
59
|
age: number;
|
|
63
60
|
// Expanding GC feature matrix. Without doing this, the configs cannot be logged in telemetry directly.
|
|
64
61
|
gcConfigs: Omit<IGarbageCollectorConfigs, "persistedGcFeatureMatrix"> & {
|
|
65
|
-
// eslint-disable-next-line import/no-deprecated
|
|
66
62
|
[K in keyof GCFeatureMatrix]: GCFeatureMatrix[K];
|
|
67
63
|
};
|
|
68
64
|
timeout?: number;
|
|
@@ -129,9 +125,9 @@ export class GCTelemetryTracker {
|
|
|
129
125
|
private readonly mc: MonitoringContext,
|
|
130
126
|
private readonly configs: IGarbageCollectorConfigs,
|
|
131
127
|
private readonly isSummarizerClient: boolean,
|
|
132
|
-
|
|
128
|
+
|
|
133
129
|
private readonly createContainerMetadata: ICreateContainerMetadata,
|
|
134
|
-
|
|
130
|
+
|
|
135
131
|
private readonly getNodeType: (nodeId: string) => GCNodeType,
|
|
136
132
|
private readonly getNodeStateTracker: (
|
|
137
133
|
nodeId: string,
|
|
@@ -152,7 +148,6 @@ export class GCTelemetryTracker {
|
|
|
152
148
|
* 2. An event is logged only once per container instance per event per node.
|
|
153
149
|
*/
|
|
154
150
|
private shouldLogNonActiveEvent(
|
|
155
|
-
// eslint-disable-next-line import/no-deprecated
|
|
156
151
|
nodeType: GCNodeType,
|
|
157
152
|
usageType: NodeUsageType,
|
|
158
153
|
nodeStateTracker: UnreferencedStateTracker,
|
|
@@ -162,14 +157,13 @@ export class GCTelemetryTracker {
|
|
|
162
157
|
return false;
|
|
163
158
|
}
|
|
164
159
|
|
|
165
|
-
// eslint-disable-next-line import/no-deprecated
|
|
166
160
|
if (nodeType === GCNodeType.Other) {
|
|
167
161
|
return false;
|
|
168
162
|
}
|
|
169
163
|
|
|
170
164
|
// For sub data store (DDS) nodes, if they are changed, its data store will also be changed,
|
|
171
165
|
// so skip logging to make the telemetry less noisy.
|
|
172
|
-
|
|
166
|
+
|
|
173
167
|
if (nodeType === GCNodeType.SubDataStore && usageType === "Changed") {
|
|
174
168
|
return false;
|
|
175
169
|
}
|
|
@@ -305,7 +299,7 @@ export class GCTelemetryTracker {
|
|
|
305
299
|
*/
|
|
306
300
|
private logTombstoneUsageTelemetry(
|
|
307
301
|
unrefEventProps: Omit<IUnreferencedEventProps, "state" | "usageType">,
|
|
308
|
-
|
|
302
|
+
|
|
309
303
|
nodeType: GCNodeType,
|
|
310
304
|
usageType: NodeUsageType,
|
|
311
305
|
packagePath?: readonly string[],
|
|
@@ -373,7 +367,6 @@ export class GCTelemetryTracker {
|
|
|
373
367
|
for (const route of currentOutboundRoutes) {
|
|
374
368
|
const nodeType = this.getNodeType(route);
|
|
375
369
|
if (
|
|
376
|
-
// eslint-disable-next-line import/no-deprecated
|
|
377
370
|
(nodeType === GCNodeType.DataStore || nodeType === GCNodeType.Blob) &&
|
|
378
371
|
!nodeId.startsWith(route) &&
|
|
379
372
|
!previousRoutes.includes(route) &&
|
package/src/index.ts
CHANGED
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
ISummaryRuntimeOptions,
|
|
8
|
-
ISummaryBaseConfiguration,
|
|
9
|
-
ISummaryConfigurationHeuristics,
|
|
10
|
-
ISummaryConfigurationDisableSummarizer,
|
|
11
|
-
ISummaryConfigurationDisableHeuristics,
|
|
12
8
|
IContainerRuntimeOptions,
|
|
13
9
|
IContainerRuntimeOptionsInternal,
|
|
14
10
|
loadContainerRuntime,
|
|
@@ -18,8 +14,6 @@ export {
|
|
|
18
14
|
DeletedResponseHeaderKey,
|
|
19
15
|
TombstoneResponseHeaderKey,
|
|
20
16
|
InactiveResponseHeaderKey,
|
|
21
|
-
ISummaryConfiguration,
|
|
22
|
-
DefaultSummaryConfiguration,
|
|
23
17
|
ICompressionRuntimeOptions,
|
|
24
18
|
CompressionAlgorithms,
|
|
25
19
|
RuntimeHeaderData,
|
|
@@ -106,6 +100,12 @@ export {
|
|
|
106
100
|
IFluidDataStoreAttributes1,
|
|
107
101
|
IFluidDataStoreAttributes2,
|
|
108
102
|
OmitAttributesVersions,
|
|
103
|
+
ISummaryBaseConfiguration,
|
|
104
|
+
ISummaryConfigurationHeuristics,
|
|
105
|
+
ISummaryConfigurationDisableSummarizer,
|
|
106
|
+
ISummaryConfigurationDisableHeuristics,
|
|
107
|
+
ISummaryConfiguration,
|
|
108
|
+
DefaultSummaryConfiguration,
|
|
109
109
|
} from "./summary/index.js";
|
|
110
110
|
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.js";
|
|
111
111
|
export { ChannelCollection } from "./channelCollection.js";
|
package/src/messageTypes.ts
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
import { IDataStoreAliasMessage } from "./dataStore.js";
|
|
15
15
|
import { GarbageCollectionMessage } from "./gc/index.js";
|
|
16
16
|
import { IChunkedOp } from "./opLifecycle/index.js";
|
|
17
|
-
// eslint-disable-next-line import/no-deprecated
|
|
18
17
|
import { IDocumentSchemaChangeMessage } from "./summary/index.js";
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -115,7 +114,6 @@ export type ContainerRuntimeGCMessage = TypedContainerRuntimeMessage<
|
|
|
115
114
|
>;
|
|
116
115
|
export type ContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<
|
|
117
116
|
ContainerMessageType.DocumentSchemaChange,
|
|
118
|
-
// eslint-disable-next-line import/no-deprecated
|
|
119
117
|
IDocumentSchemaChangeMessage
|
|
120
118
|
>;
|
|
121
119
|
|
package/src/packageVersion.ts
CHANGED