@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/containerRuntime.ts
CHANGED
|
@@ -3,47 +3,44 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type ILayerCompatDetails,
|
|
10
|
-
type IProvideLayerCompatDetails,
|
|
6
|
+
import type {
|
|
7
|
+
ILayerCompatDetails,
|
|
8
|
+
IProvideLayerCompatDetails,
|
|
11
9
|
} from "@fluid-internal/client-utils";
|
|
12
|
-
import {
|
|
13
|
-
|
|
10
|
+
import { Trace, TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
11
|
+
import type {
|
|
14
12
|
IAudience,
|
|
15
13
|
ISelf,
|
|
16
14
|
ICriticalContainerError,
|
|
17
|
-
|
|
15
|
+
IAudienceEvents,
|
|
18
16
|
} from "@fluidframework/container-definitions";
|
|
19
|
-
import {
|
|
17
|
+
import { AttachState } from "@fluidframework/container-definitions";
|
|
18
|
+
import type {
|
|
20
19
|
IContainerContext,
|
|
21
20
|
IGetPendingLocalStateProps,
|
|
22
|
-
ILoader,
|
|
23
21
|
IRuntime,
|
|
24
|
-
LoaderHeader,
|
|
25
22
|
IDeltaManager,
|
|
26
23
|
IDeltaManagerFull,
|
|
27
|
-
isIDeltaManagerFull,
|
|
28
24
|
} from "@fluidframework/container-definitions/internal";
|
|
29
|
-
import {
|
|
25
|
+
import { isIDeltaManagerFull } from "@fluidframework/container-definitions/internal";
|
|
26
|
+
import type {
|
|
30
27
|
IContainerRuntime,
|
|
31
28
|
IContainerRuntimeEvents,
|
|
32
29
|
} from "@fluidframework/container-runtime-definitions/internal";
|
|
33
|
-
import {
|
|
30
|
+
import type {
|
|
34
31
|
FluidObject,
|
|
35
32
|
IFluidHandle,
|
|
36
33
|
IRequest,
|
|
37
34
|
IResponse,
|
|
38
35
|
ITelemetryBaseLogger,
|
|
39
36
|
} from "@fluidframework/core-interfaces";
|
|
40
|
-
import {
|
|
41
|
-
|
|
37
|
+
import type {
|
|
38
|
+
IErrorBase,
|
|
42
39
|
IFluidHandleContext,
|
|
43
|
-
|
|
40
|
+
IFluidHandleInternal,
|
|
44
41
|
IProvideFluidHandleContext,
|
|
42
|
+
ISignalEnvelope,
|
|
45
43
|
} from "@fluidframework/core-interfaces/internal";
|
|
46
|
-
import { ISignalEnvelope } from "@fluidframework/core-interfaces/internal";
|
|
47
44
|
import {
|
|
48
45
|
assert,
|
|
49
46
|
Deferred,
|
|
@@ -51,25 +48,23 @@ import {
|
|
|
51
48
|
PromiseCache,
|
|
52
49
|
delay,
|
|
53
50
|
} from "@fluidframework/core-utils/internal";
|
|
54
|
-
import {
|
|
51
|
+
import type {
|
|
55
52
|
IClientDetails,
|
|
56
53
|
IQuorumClients,
|
|
57
54
|
ISummaryTree,
|
|
58
|
-
SummaryType,
|
|
59
55
|
} from "@fluidframework/driver-definitions";
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
FetchSource,
|
|
56
|
+
import { SummaryType } from "@fluidframework/driver-definitions";
|
|
57
|
+
import type {
|
|
63
58
|
IDocumentStorageService,
|
|
64
|
-
type ISnapshot,
|
|
65
59
|
IDocumentMessage,
|
|
66
|
-
ISnapshotTree,
|
|
67
|
-
ISummaryContent,
|
|
68
|
-
MessageType,
|
|
69
60
|
ISequencedDocumentMessage,
|
|
70
61
|
ISignalMessage,
|
|
71
|
-
|
|
62
|
+
ISnapshot,
|
|
63
|
+
ISnapshotTree,
|
|
64
|
+
ISummaryContent,
|
|
65
|
+
ISummaryContext,
|
|
72
66
|
} from "@fluidframework/driver-definitions/internal";
|
|
67
|
+
import { FetchSource, MessageType } from "@fluidframework/driver-definitions/internal";
|
|
73
68
|
import { readAndParse } from "@fluidframework/driver-utils/internal";
|
|
74
69
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
75
70
|
import type {
|
|
@@ -78,13 +73,11 @@ import type {
|
|
|
78
73
|
SerializedIdCompressorWithNoSession,
|
|
79
74
|
SerializedIdCompressorWithOngoingSession,
|
|
80
75
|
} from "@fluidframework/id-compressor/internal";
|
|
81
|
-
import {
|
|
76
|
+
import type {
|
|
82
77
|
ISummaryTreeWithStats,
|
|
83
78
|
ITelemetryContext,
|
|
84
79
|
IGarbageCollectionData,
|
|
85
80
|
CreateChildSummarizerNodeParam,
|
|
86
|
-
FlushMode,
|
|
87
|
-
FlushModeExperimental,
|
|
88
81
|
IDataStore,
|
|
89
82
|
IEnvelope,
|
|
90
83
|
IFluidDataStoreContextDetached,
|
|
@@ -93,11 +86,15 @@ import {
|
|
|
93
86
|
InboundAttachMessage,
|
|
94
87
|
NamedFluidDataStoreRegistryEntries,
|
|
95
88
|
SummarizeInternalFn,
|
|
89
|
+
IInboundSignalMessage,
|
|
90
|
+
IRuntimeMessagesContent,
|
|
91
|
+
ISummarizerNodeWithGC,
|
|
92
|
+
} from "@fluidframework/runtime-definitions/internal";
|
|
93
|
+
import {
|
|
94
|
+
FlushMode,
|
|
95
|
+
FlushModeExperimental,
|
|
96
96
|
channelsTreeName,
|
|
97
97
|
gcTreeKey,
|
|
98
|
-
IInboundSignalMessage,
|
|
99
|
-
type IRuntimeMessagesContent,
|
|
100
|
-
type ISummarizerNodeWithGC,
|
|
101
98
|
} from "@fluidframework/runtime-definitions/internal";
|
|
102
99
|
import {
|
|
103
100
|
GCDataBuilder,
|
|
@@ -108,23 +105,21 @@ import {
|
|
|
108
105
|
calculateStats,
|
|
109
106
|
create404Response,
|
|
110
107
|
exceptionToResponse,
|
|
111
|
-
responseToException,
|
|
112
108
|
seqFromTree,
|
|
113
109
|
} from "@fluidframework/runtime-utils/internal";
|
|
114
110
|
import type {
|
|
111
|
+
IEventSampler,
|
|
115
112
|
IFluidErrorBase,
|
|
116
113
|
ITelemetryGenericEventExt,
|
|
117
|
-
|
|
114
|
+
ITelemetryLoggerExt,
|
|
115
|
+
MonitoringContext,
|
|
118
116
|
} from "@fluidframework/telemetry-utils/internal";
|
|
119
117
|
import {
|
|
120
|
-
ITelemetryLoggerExt,
|
|
121
118
|
DataCorruptionError,
|
|
122
119
|
DataProcessingError,
|
|
123
120
|
extractSafePropertiesFromMessage,
|
|
124
121
|
GenericError,
|
|
125
|
-
IEventSampler,
|
|
126
122
|
LoggingError,
|
|
127
|
-
MonitoringContext,
|
|
128
123
|
PerformanceEvent,
|
|
129
124
|
// eslint-disable-next-line import/no-deprecated
|
|
130
125
|
TaggedLoggerAdapter,
|
|
@@ -147,7 +142,6 @@ import {
|
|
|
147
142
|
blobsTreeName,
|
|
148
143
|
isBlobPath,
|
|
149
144
|
loadBlobManagerLoadInfo,
|
|
150
|
-
// eslint-disable-next-line import/no-deprecated
|
|
151
145
|
type IBlobManagerLoadInfo,
|
|
152
146
|
} from "./blobManager/index.js";
|
|
153
147
|
import {
|
|
@@ -155,7 +149,7 @@ import {
|
|
|
155
149
|
getSummaryForDatastores,
|
|
156
150
|
wrapContext,
|
|
157
151
|
} from "./channelCollection.js";
|
|
158
|
-
import {
|
|
152
|
+
import { ReportOpPerfTelemetry } from "./connectionTelemetry.js";
|
|
159
153
|
import { ContainerFluidHandleContext } from "./containerHandleContext.js";
|
|
160
154
|
import { channelToDataStore } from "./dataStore.js";
|
|
161
155
|
import { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
@@ -165,11 +159,9 @@ import {
|
|
|
165
159
|
} from "./deltaManagerProxies.js";
|
|
166
160
|
import { DeltaScheduler } from "./deltaScheduler.js";
|
|
167
161
|
import {
|
|
168
|
-
// eslint-disable-next-line import/no-deprecated
|
|
169
162
|
GCNodeType,
|
|
170
163
|
GarbageCollector,
|
|
171
164
|
IGCRuntimeOptions,
|
|
172
|
-
// eslint-disable-next-line import/no-deprecated
|
|
173
165
|
IGCStats,
|
|
174
166
|
IGarbageCollector,
|
|
175
167
|
gcGenerationOptionName,
|
|
@@ -210,39 +202,27 @@ import {
|
|
|
210
202
|
IPendingLocalState,
|
|
211
203
|
PendingStateManager,
|
|
212
204
|
} from "./pendingStateManager.js";
|
|
205
|
+
import { SignalTelemetryManager } from "./signalTelemetryProcessing.js";
|
|
213
206
|
import {
|
|
214
|
-
// eslint-disable-next-line import/no-deprecated
|
|
215
207
|
DocumentsSchemaController,
|
|
216
208
|
EnqueueSummarizeResult,
|
|
217
209
|
IBaseSummarizeResult,
|
|
218
|
-
// eslint-disable-next-line import/no-deprecated
|
|
219
210
|
IConnectableRuntime,
|
|
220
|
-
// eslint-disable-next-line import/no-deprecated
|
|
221
211
|
IContainerRuntimeMetadata,
|
|
222
|
-
// eslint-disable-next-line import/no-deprecated
|
|
223
212
|
ICreateContainerMetadata,
|
|
224
|
-
// eslint-disable-next-line import/no-deprecated
|
|
225
213
|
type IDocumentSchemaChangeMessage,
|
|
226
|
-
// eslint-disable-next-line import/no-deprecated
|
|
227
214
|
type IDocumentSchemaCurrent,
|
|
228
215
|
IEnqueueSummarizeOptions,
|
|
229
216
|
IGenerateSummaryTreeResult,
|
|
230
217
|
IGeneratedSummaryStats,
|
|
231
218
|
IOnDemandSummarizeOptions,
|
|
232
|
-
// eslint-disable-next-line import/no-deprecated
|
|
233
219
|
IRefreshSummaryAckOptions,
|
|
234
220
|
IRootSummarizerNodeWithGC,
|
|
235
|
-
// eslint-disable-next-line import/no-deprecated
|
|
236
221
|
ISerializedElection,
|
|
237
|
-
// eslint-disable-next-line import/no-deprecated
|
|
238
222
|
ISubmitSummaryOptions,
|
|
239
223
|
ISummarizeResults,
|
|
240
|
-
ISummarizer,
|
|
241
|
-
// eslint-disable-next-line import/no-deprecated
|
|
242
224
|
ISummarizerInternalsProvider,
|
|
243
|
-
// eslint-disable-next-line import/no-deprecated
|
|
244
225
|
ISummarizerRuntime,
|
|
245
|
-
// eslint-disable-next-line import/no-deprecated
|
|
246
226
|
ISummaryMetadataMessage,
|
|
247
227
|
IdCompressorMode,
|
|
248
228
|
OrderedClientCollection,
|
|
@@ -250,7 +230,6 @@ import {
|
|
|
250
230
|
RetriableSummaryError,
|
|
251
231
|
RunWhileConnectedCoordinator,
|
|
252
232
|
SubmitSummaryResult,
|
|
253
|
-
// eslint-disable-next-line import/no-deprecated
|
|
254
233
|
Summarizer,
|
|
255
234
|
SummarizerClientElection,
|
|
256
235
|
SummaryCollection,
|
|
@@ -266,8 +245,13 @@ import {
|
|
|
266
245
|
rootHasIsolatedChannels,
|
|
267
246
|
summarizerClientType,
|
|
268
247
|
wrapSummaryInChannelsTree,
|
|
269
|
-
// eslint-disable-next-line import/no-deprecated
|
|
270
248
|
type IDocumentSchemaFeatures,
|
|
249
|
+
formCreateSummarizerFn,
|
|
250
|
+
summarizerRequestUrl,
|
|
251
|
+
validateSummaryHeuristicConfiguration,
|
|
252
|
+
ISummaryConfiguration,
|
|
253
|
+
DefaultSummaryConfiguration,
|
|
254
|
+
isSummariesDisabled,
|
|
271
255
|
} from "./summary/index.js";
|
|
272
256
|
import { Throttler, formExponentialFn } from "./throttler.js";
|
|
273
257
|
|
|
@@ -300,154 +284,6 @@ function getUnknownMessageTypeError(
|
|
|
300
284
|
);
|
|
301
285
|
}
|
|
302
286
|
|
|
303
|
-
/**
|
|
304
|
-
* @legacy
|
|
305
|
-
* @alpha
|
|
306
|
-
*/
|
|
307
|
-
export interface ISummaryBaseConfiguration {
|
|
308
|
-
/**
|
|
309
|
-
* Delay before first attempt to spawn summarizing container.
|
|
310
|
-
*/
|
|
311
|
-
initialSummarizerDelayMs: number;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Defines the maximum allowed time to wait for a pending summary ack.
|
|
315
|
-
* The maximum amount of time client will wait for a summarize is the minimum of
|
|
316
|
-
* maxSummarizeAckWaitTime (currently 3 * 60 * 1000) and maxAckWaitTime.
|
|
317
|
-
*/
|
|
318
|
-
maxAckWaitTime: number;
|
|
319
|
-
/**
|
|
320
|
-
* Defines the maximum number of Ops in between Summaries that can be
|
|
321
|
-
* allowed before forcibly electing a new summarizer client.
|
|
322
|
-
*/
|
|
323
|
-
maxOpsSinceLastSummary: number;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* @legacy
|
|
328
|
-
* @alpha
|
|
329
|
-
*/
|
|
330
|
-
export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfiguration {
|
|
331
|
-
state: "enabled";
|
|
332
|
-
/**
|
|
333
|
-
* Defines the maximum allowed time, since the last received Ack, before running the summary
|
|
334
|
-
* with reason maxTime.
|
|
335
|
-
* For example, say we receive ops one by one just before the idle time is triggered.
|
|
336
|
-
* In this case, we still want to run a summary since it's been a while since the last summary.
|
|
337
|
-
*/
|
|
338
|
-
maxTime: number;
|
|
339
|
-
/**
|
|
340
|
-
* Defines the maximum number of Ops, since the last received Ack, that can be allowed
|
|
341
|
-
* before running the summary with reason maxOps.
|
|
342
|
-
*/
|
|
343
|
-
maxOps: number;
|
|
344
|
-
/**
|
|
345
|
-
* Defines the minimum number of Ops, since the last received Ack, that can be allowed
|
|
346
|
-
* before running the last summary.
|
|
347
|
-
*/
|
|
348
|
-
minOpsForLastSummaryAttempt: number;
|
|
349
|
-
/**
|
|
350
|
-
* Defines the lower boundary for the allowed time in between summarizations.
|
|
351
|
-
* Pairs with maxIdleTime to form a range.
|
|
352
|
-
* For example, if we only receive 1 op, we don't want to have the same idle time as say 100 ops.
|
|
353
|
-
* Based on the boundaries we set in minIdleTime and maxIdleTime, the idle time will change
|
|
354
|
-
* linearly depending on the number of ops we receive.
|
|
355
|
-
*/
|
|
356
|
-
minIdleTime: number;
|
|
357
|
-
/**
|
|
358
|
-
* Defines the upper boundary for the allowed time in between summarizations.
|
|
359
|
-
* Pairs with minIdleTime to form a range.
|
|
360
|
-
* For example, if we only receive 1 op, we don't want to have the same idle time as say 100 ops.
|
|
361
|
-
* Based on the boundaries we set in minIdleTime and maxIdleTime, the idle time will change
|
|
362
|
-
* linearly depending on the number of ops we receive.
|
|
363
|
-
*/
|
|
364
|
-
maxIdleTime: number;
|
|
365
|
-
/**
|
|
366
|
-
* Runtime op weight to use in heuristic summarizing.
|
|
367
|
-
* This number is a multiplier on the number of runtime ops we process when running summarize heuristics.
|
|
368
|
-
* For example: (multiplier) * (number of runtime ops) = weighted number of runtime ops
|
|
369
|
-
*/
|
|
370
|
-
runtimeOpWeight: number;
|
|
371
|
-
/**
|
|
372
|
-
* Non-runtime op weight to use in heuristic summarizing
|
|
373
|
-
* This number is a multiplier on the number of non-runtime ops we process when running summarize heuristics.
|
|
374
|
-
* For example: (multiplier) * (number of non-runtime ops) = weighted number of non-runtime ops
|
|
375
|
-
*/
|
|
376
|
-
nonRuntimeOpWeight: number;
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Number of ops since last summary needed before a non-runtime op can trigger running summary heuristics.
|
|
380
|
-
*
|
|
381
|
-
* Note: Any runtime ops sent before the threshold is reached will trigger heuristics normally.
|
|
382
|
-
* This threshold ONLY applies to non-runtime ops triggering summaries.
|
|
383
|
-
*
|
|
384
|
-
* For example: Say the threshold is 20. Sending 19 non-runtime ops will not trigger any heuristic checks.
|
|
385
|
-
* Sending the 20th non-runtime op will trigger the heuristic checks for summarizing.
|
|
386
|
-
*/
|
|
387
|
-
nonRuntimeHeuristicThreshold?: number;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* @legacy
|
|
392
|
-
* @alpha
|
|
393
|
-
*/
|
|
394
|
-
export interface ISummaryConfigurationDisableSummarizer {
|
|
395
|
-
state: "disabled";
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* @legacy
|
|
400
|
-
* @alpha
|
|
401
|
-
*/
|
|
402
|
-
export interface ISummaryConfigurationDisableHeuristics extends ISummaryBaseConfiguration {
|
|
403
|
-
state: "disableHeuristics";
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* @legacy
|
|
408
|
-
* @alpha
|
|
409
|
-
*/
|
|
410
|
-
export type ISummaryConfiguration =
|
|
411
|
-
| ISummaryConfigurationDisableSummarizer
|
|
412
|
-
| ISummaryConfigurationDisableHeuristics
|
|
413
|
-
| ISummaryConfigurationHeuristics;
|
|
414
|
-
|
|
415
|
-
export function isSummariesDisabled(
|
|
416
|
-
config: ISummaryConfiguration,
|
|
417
|
-
): config is ISummaryConfigurationDisableSummarizer {
|
|
418
|
-
return config.state === "disabled";
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* @legacy
|
|
423
|
-
* @alpha
|
|
424
|
-
*/
|
|
425
|
-
export const DefaultSummaryConfiguration: ISummaryConfiguration = {
|
|
426
|
-
state: "enabled",
|
|
427
|
-
|
|
428
|
-
minIdleTime: 0,
|
|
429
|
-
|
|
430
|
-
maxIdleTime: 30 * 1000, // 30 secs.
|
|
431
|
-
|
|
432
|
-
maxTime: 60 * 1000, // 1 min.
|
|
433
|
-
|
|
434
|
-
maxOps: 100, // Summarize if 100 weighted ops received since last snapshot.
|
|
435
|
-
|
|
436
|
-
minOpsForLastSummaryAttempt: 10,
|
|
437
|
-
|
|
438
|
-
maxAckWaitTime: 3 * 60 * 1000, // 3 mins.
|
|
439
|
-
|
|
440
|
-
maxOpsSinceLastSummary: 7000,
|
|
441
|
-
|
|
442
|
-
initialSummarizerDelayMs: 5 * 1000, // 5 secs.
|
|
443
|
-
|
|
444
|
-
nonRuntimeOpWeight: 0.1,
|
|
445
|
-
|
|
446
|
-
runtimeOpWeight: 1,
|
|
447
|
-
|
|
448
|
-
nonRuntimeHeuristicThreshold: 20,
|
|
449
|
-
};
|
|
450
|
-
|
|
451
287
|
/**
|
|
452
288
|
* @legacy
|
|
453
289
|
* @alpha
|
|
@@ -565,7 +401,7 @@ export interface IContainerRuntimeOptions {
|
|
|
565
401
|
*
|
|
566
402
|
* These options are not available to consumers when creating a new container runtime,
|
|
567
403
|
* but we do need to expose them for internal use, e.g. when configuring the container runtime
|
|
568
|
-
* to ensure
|
|
404
|
+
* to ensure compatibility with older versions.
|
|
569
405
|
*
|
|
570
406
|
* @internal
|
|
571
407
|
*/
|
|
@@ -587,9 +423,7 @@ export interface IContainerRuntimeOptionsInternal extends IContainerRuntimeOptio
|
|
|
587
423
|
|
|
588
424
|
/**
|
|
589
425
|
* Error responses when requesting a deleted object will have this header set to true
|
|
590
|
-
* @
|
|
591
|
-
* @alpha
|
|
592
|
-
* @deprecated This type will be moved to internal in 2.30. External usage is not necessary or supported.
|
|
426
|
+
* @internal
|
|
593
427
|
*/
|
|
594
428
|
export const DeletedResponseHeaderKey = "wasDeleted";
|
|
595
429
|
/**
|
|
@@ -782,50 +616,6 @@ export const makeLegacySendBatchFn =
|
|
|
782
616
|
return clientSequenceNumber;
|
|
783
617
|
};
|
|
784
618
|
|
|
785
|
-
const summarizerRequestUrl = "_summarizer";
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* Create and retrieve the summmarizer
|
|
789
|
-
*/
|
|
790
|
-
async function createSummarizer(loader: ILoader, url: string): Promise<ISummarizer> {
|
|
791
|
-
const request: IRequest = {
|
|
792
|
-
headers: {
|
|
793
|
-
[LoaderHeader.cache]: false,
|
|
794
|
-
[LoaderHeader.clientDetails]: {
|
|
795
|
-
capabilities: { interactive: false },
|
|
796
|
-
type: summarizerClientType,
|
|
797
|
-
},
|
|
798
|
-
[DriverHeader.summarizingClient]: true,
|
|
799
|
-
[LoaderHeader.reconnect]: false,
|
|
800
|
-
},
|
|
801
|
-
url,
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
const resolvedContainer = await loader.resolve(request);
|
|
805
|
-
let fluidObject: FluidObject<ISummarizer> | undefined;
|
|
806
|
-
|
|
807
|
-
// Older containers may not have the "getEntryPoint" API
|
|
808
|
-
// ! This check will need to stay until LTS of loader moves past 2.0.0-internal.7.0.0
|
|
809
|
-
if (resolvedContainer.getEntryPoint === undefined) {
|
|
810
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any
|
|
811
|
-
const response = (await (resolvedContainer as any).request({
|
|
812
|
-
url: `/${summarizerRequestUrl}`,
|
|
813
|
-
})) as IResponse;
|
|
814
|
-
if (response.status !== 200 || response.mimeType !== "fluid/object") {
|
|
815
|
-
throw responseToException(response, request);
|
|
816
|
-
}
|
|
817
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
818
|
-
fluidObject = response.value;
|
|
819
|
-
} else {
|
|
820
|
-
fluidObject = await resolvedContainer.getEntryPoint();
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
if (fluidObject?.ISummarizer === undefined) {
|
|
824
|
-
throw new UsageError("Fluid object does not implement ISummarizer");
|
|
825
|
-
}
|
|
826
|
-
return fluidObject.ISummarizer;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
619
|
/**
|
|
830
620
|
* Extract last message from the snapshot metadata.
|
|
831
621
|
* Uses legacy property if not using explicit schema control, otherwise uses the new property.
|
|
@@ -833,9 +623,7 @@ async function createSummarizer(loader: ILoader, url: string): Promise<ISummariz
|
|
|
833
623
|
* Please see addMetadataToSummary() as well
|
|
834
624
|
*/
|
|
835
625
|
function lastMessageFromMetadata(
|
|
836
|
-
// eslint-disable-next-line import/no-deprecated
|
|
837
626
|
metadata: IContainerRuntimeMetadata | undefined,
|
|
838
|
-
// eslint-disable-next-line import/no-deprecated
|
|
839
627
|
): ISummaryMetadataMessage | undefined {
|
|
840
628
|
return metadata?.documentSchema?.runtime?.explicitSchemaControl
|
|
841
629
|
? metadata?.lastMessage
|
|
@@ -913,8 +701,6 @@ export async function loadContainerRuntime(
|
|
|
913
701
|
|
|
914
702
|
const defaultMaxConsecutiveReconnects = 7;
|
|
915
703
|
|
|
916
|
-
const defaultTelemetrySignalSampleCount = 100;
|
|
917
|
-
|
|
918
704
|
/**
|
|
919
705
|
* Represents the runtime of the container. Contains helper functions/state of the container.
|
|
920
706
|
* It will define the store level mappings.
|
|
@@ -926,9 +712,7 @@ export class ContainerRuntime
|
|
|
926
712
|
implements
|
|
927
713
|
IContainerRuntime,
|
|
928
714
|
IRuntime,
|
|
929
|
-
// eslint-disable-next-line import/no-deprecated
|
|
930
715
|
ISummarizerRuntime,
|
|
931
|
-
// eslint-disable-next-line import/no-deprecated
|
|
932
716
|
ISummarizerInternalsProvider,
|
|
933
717
|
IProvideFluidHandleContext,
|
|
934
718
|
IProvideLayerCompatDetails
|
|
@@ -952,7 +736,7 @@ export class ContainerRuntime
|
|
|
952
736
|
context: IContainerContext;
|
|
953
737
|
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
954
738
|
existing: boolean;
|
|
955
|
-
runtimeOptions?:
|
|
739
|
+
runtimeOptions?: IContainerRuntimeOptionsInternal;
|
|
956
740
|
containerScope?: FluidObject;
|
|
957
741
|
containerRuntimeCtor?: typeof ContainerRuntime;
|
|
958
742
|
/**
|
|
@@ -967,7 +751,7 @@ export class ContainerRuntime
|
|
|
967
751
|
existing,
|
|
968
752
|
requestHandler,
|
|
969
753
|
provideEntryPoint,
|
|
970
|
-
runtimeOptions = {} satisfies
|
|
754
|
+
runtimeOptions = {} satisfies IContainerRuntimeOptionsInternal,
|
|
971
755
|
containerScope = {},
|
|
972
756
|
containerRuntimeCtor = ContainerRuntime,
|
|
973
757
|
} = params;
|
|
@@ -1032,16 +816,16 @@ export class ContainerRuntime
|
|
|
1032
816
|
tryFetchBlob<ReturnType<DuplicateBatchDetector["getRecentBatchInfoForSummary"]>>(
|
|
1033
817
|
recentBatchInfoBlobName,
|
|
1034
818
|
),
|
|
1035
|
-
|
|
819
|
+
|
|
1036
820
|
tryFetchBlob<IContainerRuntimeMetadata>(metadataBlobName),
|
|
1037
|
-
|
|
821
|
+
|
|
1038
822
|
tryFetchBlob<ISerializedElection>(electedSummarizerBlobName),
|
|
1039
823
|
tryFetchBlob<[string, string][]>(aliasBlobName),
|
|
1040
824
|
tryFetchBlob<SerializedIdCompressorWithNoSession>(idCompressorBlobName),
|
|
1041
825
|
]);
|
|
1042
826
|
|
|
1043
827
|
// read snapshot blobs needed for BlobManager to load
|
|
1044
|
-
const
|
|
828
|
+
const blobManagerLoadInfo = await loadBlobManagerLoadInfo(context);
|
|
1045
829
|
|
|
1046
830
|
const messageAtLastSummary = lastMessageFromMetadata(metadata);
|
|
1047
831
|
|
|
@@ -1170,7 +954,6 @@ export class ContainerRuntime
|
|
|
1170
954
|
compressionOptions.minimumBatchSizeInBytes !== Number.POSITIVE_INFINITY &&
|
|
1171
955
|
compressionOptions.compressionAlgorithm === "lz4";
|
|
1172
956
|
|
|
1173
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1174
957
|
const documentSchemaController = new DocumentsSchemaController(
|
|
1175
958
|
existing,
|
|
1176
959
|
protocolSequenceNumber,
|
|
@@ -1219,7 +1002,7 @@ export class ContainerRuntime
|
|
|
1219
1002
|
containerScope,
|
|
1220
1003
|
logger,
|
|
1221
1004
|
existing,
|
|
1222
|
-
|
|
1005
|
+
blobManagerLoadInfo,
|
|
1223
1006
|
context.storage,
|
|
1224
1007
|
createIdCompressorFn,
|
|
1225
1008
|
documentSchemaController,
|
|
@@ -1308,11 +1091,9 @@ export class ContainerRuntime
|
|
|
1308
1091
|
* this op roundtrips, compression will be On. Client can't send compressed ops until it's change in schema.
|
|
1309
1092
|
*/
|
|
1310
1093
|
public get sessionSchema(): {
|
|
1311
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1312
1094
|
[P in keyof IDocumentSchemaFeatures]?: IDocumentSchemaFeatures[P] extends boolean
|
|
1313
1095
|
? true
|
|
1314
|
-
:
|
|
1315
|
-
IDocumentSchemaFeatures[P];
|
|
1096
|
+
: IDocumentSchemaFeatures[P];
|
|
1316
1097
|
} {
|
|
1317
1098
|
return this.documentsSchemaController.sessionSchema.runtime;
|
|
1318
1099
|
}
|
|
@@ -1448,24 +1229,15 @@ export class ContainerRuntime
|
|
|
1448
1229
|
private emitDirtyDocumentEvent = true;
|
|
1449
1230
|
private readonly useDeltaManagerOpsProxy: boolean;
|
|
1450
1231
|
private readonly closeSummarizerDelayMs: number;
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
signalsLost: 0,
|
|
1454
|
-
signalsOutOfOrder: 0,
|
|
1455
|
-
signalsSentSinceLastLatencyMeasurement: 0,
|
|
1456
|
-
broadcastSignalSequenceNumber: 0,
|
|
1457
|
-
signalTimestamp: 0,
|
|
1458
|
-
roundTripSignalSequenceNumber: undefined,
|
|
1459
|
-
trackingSignalSequenceNumber: undefined,
|
|
1460
|
-
minimumTrackingSignalSequenceNumber: undefined,
|
|
1461
|
-
};
|
|
1232
|
+
|
|
1233
|
+
private readonly signalTelemetryManager = new SignalTelemetryManager();
|
|
1462
1234
|
|
|
1463
1235
|
/**
|
|
1464
1236
|
* Summarizer is responsible for coordinating when to send generate and send summaries.
|
|
1465
1237
|
* It is the main entry point for summary work.
|
|
1466
1238
|
* It is created only by summarizing container (i.e. one with clientType === "summarizer")
|
|
1467
1239
|
*/
|
|
1468
|
-
|
|
1240
|
+
|
|
1469
1241
|
private readonly _summarizer?: Summarizer;
|
|
1470
1242
|
private readonly deltaScheduler: DeltaScheduler;
|
|
1471
1243
|
private readonly inboundBatchAggregator: InboundBatchAggregator;
|
|
@@ -1481,12 +1253,11 @@ export class ContainerRuntime
|
|
|
1481
1253
|
/**
|
|
1482
1254
|
* The last message processed at the time of the last summary.
|
|
1483
1255
|
*/
|
|
1484
|
-
|
|
1256
|
+
|
|
1485
1257
|
private messageAtLastSummary: ISummaryMetadataMessage | undefined;
|
|
1486
1258
|
|
|
1487
1259
|
private readonly summariesDisabled: boolean;
|
|
1488
1260
|
|
|
1489
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1490
1261
|
private readonly createContainerMetadata: ICreateContainerMetadata;
|
|
1491
1262
|
/**
|
|
1492
1263
|
* The summary number of the next summary that will be generated for this container. This is incremented every time
|
|
@@ -1546,22 +1317,22 @@ export class ContainerRuntime
|
|
|
1546
1317
|
protected constructor(
|
|
1547
1318
|
context: IContainerContext,
|
|
1548
1319
|
private readonly registry: IFluidDataStoreRegistry,
|
|
1549
|
-
|
|
1320
|
+
|
|
1550
1321
|
private readonly metadata: IContainerRuntimeMetadata | undefined,
|
|
1551
|
-
|
|
1322
|
+
|
|
1552
1323
|
electedSummarizerData: ISerializedElection | undefined,
|
|
1553
1324
|
chunks: [string, string[]][],
|
|
1554
1325
|
dataStoreAliasMap: [string, string][],
|
|
1555
|
-
|
|
1326
|
+
runtimeOptions: Readonly<Required<IContainerRuntimeOptionsInternal>>,
|
|
1556
1327
|
private readonly containerScope: FluidObject,
|
|
1557
1328
|
// Create a custom ITelemetryBaseLogger to output telemetry events.
|
|
1558
1329
|
public readonly baseLogger: ITelemetryBaseLogger,
|
|
1559
1330
|
existing: boolean,
|
|
1560
|
-
|
|
1561
|
-
|
|
1331
|
+
|
|
1332
|
+
blobManagerLoadInfo: IBlobManagerLoadInfo,
|
|
1562
1333
|
private readonly _storage: IDocumentStorageService,
|
|
1563
1334
|
private readonly createIdCompressor: () => Promise<IIdCompressor & IIdCompressorCore>,
|
|
1564
|
-
|
|
1335
|
+
|
|
1565
1336
|
private readonly documentsSchemaController: DocumentsSchemaController,
|
|
1566
1337
|
featureGatesForTelemetry: Record<string, boolean | number | undefined>,
|
|
1567
1338
|
provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>,
|
|
@@ -1574,7 +1345,7 @@ export class ContainerRuntime
|
|
|
1574
1345
|
// the defaults
|
|
1575
1346
|
...DefaultSummaryConfiguration,
|
|
1576
1347
|
// the runtime configuration overrides
|
|
1577
|
-
...
|
|
1348
|
+
...runtimeOptions.summaryOptions?.summaryConfigOverrides,
|
|
1578
1349
|
},
|
|
1579
1350
|
recentBatchInfo?: [number, string][],
|
|
1580
1351
|
) {
|
|
@@ -1606,11 +1377,6 @@ export class ContainerRuntime
|
|
|
1606
1377
|
const maybeLoaderCompatDetails = context as FluidObject<ILayerCompatDetails>;
|
|
1607
1378
|
validateLoaderCompatibility(maybeLoaderCompatDetails.ILayerCompatDetails, this.disposeFn);
|
|
1608
1379
|
|
|
1609
|
-
// Backfill in defaults for the internal runtimeOptions, since they may not be present on the provided runtimeOptions object
|
|
1610
|
-
const runtimeOptions = {
|
|
1611
|
-
flushMode: defaultFlushMode,
|
|
1612
|
-
...baseRuntimeOptions,
|
|
1613
|
-
};
|
|
1614
1380
|
this.mc = createChildMonitoringContext({
|
|
1615
1381
|
logger: this.baseLogger,
|
|
1616
1382
|
namespace: "ContainerRuntime",
|
|
@@ -1762,7 +1528,7 @@ export class ContainerRuntime
|
|
|
1762
1528
|
this.handleContext = new ContainerFluidHandleContext("", this);
|
|
1763
1529
|
|
|
1764
1530
|
if (summaryConfiguration.state === "enabled") {
|
|
1765
|
-
|
|
1531
|
+
validateSummaryHeuristicConfiguration(summaryConfiguration);
|
|
1766
1532
|
}
|
|
1767
1533
|
|
|
1768
1534
|
this.summariesDisabled = isSummariesDisabled(summaryConfiguration);
|
|
@@ -1883,13 +1649,14 @@ export class ContainerRuntime
|
|
|
1883
1649
|
// what is the interface of passing signals, we need the
|
|
1884
1650
|
// downstream stores to wrap the signal.
|
|
1885
1651
|
parentContext.submitSignal = (type: string, content: unknown, targetClientId?: string) => {
|
|
1652
|
+
// Future: Can the `content` argument type be IEnvelope?
|
|
1653
|
+
// verifyNotClosed is called in FluidDataStoreContext, which is *the* expected caller.
|
|
1886
1654
|
const envelope1 = content as IEnvelope;
|
|
1887
|
-
const envelope2 =
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
);
|
|
1892
|
-
return this.submitEnvelopedSignal(envelope2, targetClientId);
|
|
1655
|
+
const envelope2 = createNewSignalEnvelope(envelope1.address, type, envelope1.contents);
|
|
1656
|
+
if (targetClientId === undefined) {
|
|
1657
|
+
this.signalTelemetryManager.applyTrackingToBroadcastSignalEnvelope(envelope2);
|
|
1658
|
+
}
|
|
1659
|
+
this.submitSignalFn(envelope2, targetClientId);
|
|
1893
1660
|
};
|
|
1894
1661
|
|
|
1895
1662
|
let snapshot: ISnapshot | ISnapshotTree | undefined = getSummaryForDatastores(
|
|
@@ -1919,8 +1686,8 @@ export class ContainerRuntime
|
|
|
1919
1686
|
|
|
1920
1687
|
this.blobManager = new BlobManager({
|
|
1921
1688
|
routeContext: this.handleContext,
|
|
1922
|
-
|
|
1923
|
-
|
|
1689
|
+
blobManagerLoadInfo,
|
|
1690
|
+
storage: this.storage,
|
|
1924
1691
|
sendBlobAttachOp: (localId: string, blobId?: string) => {
|
|
1925
1692
|
if (!this.disposed) {
|
|
1926
1693
|
this.submit(
|
|
@@ -2058,14 +1825,13 @@ export class ContainerRuntime
|
|
|
2058
1825
|
);
|
|
2059
1826
|
|
|
2060
1827
|
if (isSummarizerClient) {
|
|
2061
|
-
// eslint-disable-next-line import/no-deprecated
|
|
2062
1828
|
this._summarizer = new Summarizer(
|
|
2063
1829
|
this /* ISummarizerRuntime */,
|
|
2064
1830
|
() => summaryConfiguration,
|
|
2065
1831
|
this /* ISummarizerInternalsProvider */,
|
|
2066
1832
|
this.handleContext,
|
|
2067
1833
|
summaryCollection,
|
|
2068
|
-
|
|
1834
|
+
|
|
2069
1835
|
async (runtime: IConnectableRuntime) =>
|
|
2070
1836
|
RunWhileConnectedCoordinator.create(
|
|
2071
1837
|
runtime,
|
|
@@ -2103,7 +1869,7 @@ export class ContainerRuntime
|
|
|
2103
1869
|
this, // IConnectedState
|
|
2104
1870
|
summaryCollection,
|
|
2105
1871
|
this.baseLogger,
|
|
2106
|
-
|
|
1872
|
+
formCreateSummarizerFn(loader),
|
|
2107
1873
|
new Throttler(
|
|
2108
1874
|
60 * 1000, // 60 sec delay window
|
|
2109
1875
|
30 * 1000, // 30 sec max delay
|
|
@@ -2146,7 +1912,7 @@ export class ContainerRuntime
|
|
|
2146
1912
|
summaryFormatVersion: metadata?.summaryFormatVersion,
|
|
2147
1913
|
disableIsolatedChannels: metadata?.disableIsolatedChannels,
|
|
2148
1914
|
gcVersion: metadata?.gcFeature,
|
|
2149
|
-
options: JSON.stringify(
|
|
1915
|
+
options: JSON.stringify(runtimeOptions),
|
|
2150
1916
|
idCompressorModeMetadata: metadata?.documentSchema?.runtime?.idCompressorMode,
|
|
2151
1917
|
idCompressorMode: this.sessionSchema.idCompressorMode,
|
|
2152
1918
|
sessionRuntimeSchema: JSON.stringify(this.sessionSchema),
|
|
@@ -2175,7 +1941,6 @@ export class ContainerRuntime
|
|
|
2175
1941
|
this.skipSavedCompressorOps = pendingRuntimeState?.pendingIdCompressorState !== undefined;
|
|
2176
1942
|
}
|
|
2177
1943
|
|
|
2178
|
-
// eslint-disable-next-line import/no-deprecated
|
|
2179
1944
|
public onSchemaChange(schema: IDocumentSchemaCurrent): void {
|
|
2180
1945
|
this.mc.logger.sendTelemetryEvent({
|
|
2181
1946
|
eventName: "SchemaChangeAccept",
|
|
@@ -2453,13 +2218,11 @@ export class ContainerRuntime
|
|
|
2453
2218
|
|
|
2454
2219
|
if (id === blobManagerBasePath && requestParser.isLeaf(2)) {
|
|
2455
2220
|
const blob = await this.blobManager.getBlob(requestParser.pathParts[1]);
|
|
2456
|
-
return
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
}
|
|
2462
|
-
: create404Response(request);
|
|
2221
|
+
return {
|
|
2222
|
+
status: 200,
|
|
2223
|
+
mimeType: "fluid/object",
|
|
2224
|
+
value: blob,
|
|
2225
|
+
};
|
|
2463
2226
|
} else if (requestParser.pathParts.length > 0) {
|
|
2464
2227
|
return await this.channelCollection.request(request);
|
|
2465
2228
|
}
|
|
@@ -2499,7 +2262,6 @@ export class ContainerRuntime
|
|
|
2499
2262
|
// Is document schema explicit control on?
|
|
2500
2263
|
const explicitSchemaControl = documentSchema?.runtime.explicitSchemaControl;
|
|
2501
2264
|
|
|
2502
|
-
// eslint-disable-next-line import/no-deprecated
|
|
2503
2265
|
const metadata: IContainerRuntimeMetadata = {
|
|
2504
2266
|
...this.createContainerMetadata,
|
|
2505
2267
|
// Increment the summary number for the next summary that will be generated.
|
|
@@ -2513,8 +2275,7 @@ export class ContainerRuntime
|
|
|
2513
2275
|
// last message's sequence number.
|
|
2514
2276
|
// See also lastMessageFromMetadata()
|
|
2515
2277
|
message: explicitSchemaControl
|
|
2516
|
-
?
|
|
2517
|
-
({ sequenceNumber: -1 } as unknown as ISummaryMetadataMessage)
|
|
2278
|
+
? ({ sequenceNumber: -1 } as unknown as ISummaryMetadataMessage)
|
|
2518
2279
|
: message,
|
|
2519
2280
|
lastMessage: explicitSchemaControl ? message : undefined,
|
|
2520
2281
|
documentSchema,
|
|
@@ -2796,14 +2557,7 @@ export class ContainerRuntime
|
|
|
2796
2557
|
0x3cd /* Connection is possible only if container exists in storage */,
|
|
2797
2558
|
);
|
|
2798
2559
|
if (changeOfState) {
|
|
2799
|
-
this.
|
|
2800
|
-
this._signalTracking.signalsOutOfOrder = 0;
|
|
2801
|
-
this._signalTracking.signalTimestamp = 0;
|
|
2802
|
-
this._signalTracking.signalsSentSinceLastLatencyMeasurement = 0;
|
|
2803
|
-
this._signalTracking.totalSignalsSentInLatencyWindow = 0;
|
|
2804
|
-
this._signalTracking.roundTripSignalSequenceNumber = undefined;
|
|
2805
|
-
this._signalTracking.trackingSignalSequenceNumber = undefined;
|
|
2806
|
-
this._signalTracking.minimumTrackingSignalSequenceNumber = undefined;
|
|
2560
|
+
this.signalTelemetryManager.resetTracking();
|
|
2807
2561
|
}
|
|
2808
2562
|
}
|
|
2809
2563
|
|
|
@@ -3207,7 +2961,6 @@ export class ContainerRuntime
|
|
|
3207
2961
|
}
|
|
3208
2962
|
case ContainerMessageType.DocumentSchemaChange: {
|
|
3209
2963
|
this.documentsSchemaController.processDocumentSchemaMessages(
|
|
3210
|
-
// eslint-disable-next-line import/no-deprecated
|
|
3211
2964
|
contents as IDocumentSchemaChangeMessage[],
|
|
3212
2965
|
local,
|
|
3213
2966
|
message.sequenceNumber,
|
|
@@ -3255,107 +3008,6 @@ export class ContainerRuntime
|
|
|
3255
3008
|
}
|
|
3256
3009
|
}
|
|
3257
3010
|
|
|
3258
|
-
/**
|
|
3259
|
-
* Emits the Signal event and update the perf signal data.
|
|
3260
|
-
*/
|
|
3261
|
-
private sendSignalTelemetryEvent(): void {
|
|
3262
|
-
const duration = Date.now() - this._signalTracking.signalTimestamp;
|
|
3263
|
-
this.mc.logger.sendPerformanceEvent({
|
|
3264
|
-
eventName: "SignalLatency",
|
|
3265
|
-
details: {
|
|
3266
|
-
duration, // Roundtrip duration of the tracked signal in milliseconds.
|
|
3267
|
-
sent: this._signalTracking.totalSignalsSentInLatencyWindow, // Signals sent since the last logged SignalLatency event.
|
|
3268
|
-
lost: this._signalTracking.signalsLost, // Signals lost since the last logged SignalLatency event.
|
|
3269
|
-
outOfOrder: this._signalTracking.signalsOutOfOrder, // Out of order signals since the last logged SignalLatency event.
|
|
3270
|
-
reconnectCount: this.consecutiveReconnects, // Container reconnect count.
|
|
3271
|
-
},
|
|
3272
|
-
});
|
|
3273
|
-
this._signalTracking.signalsLost = 0;
|
|
3274
|
-
this._signalTracking.signalsOutOfOrder = 0;
|
|
3275
|
-
this._signalTracking.signalTimestamp = 0;
|
|
3276
|
-
this._signalTracking.totalSignalsSentInLatencyWindow = 0;
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
/**
|
|
3280
|
-
* Updates signal telemetry including emitting telemetry events.
|
|
3281
|
-
*/
|
|
3282
|
-
private processSignalForTelemetry(envelope: ISignalEnvelope): void {
|
|
3283
|
-
const {
|
|
3284
|
-
clientBroadcastSignalSequenceNumber,
|
|
3285
|
-
contents: envelopeContents,
|
|
3286
|
-
address: envelopeAddress,
|
|
3287
|
-
} = envelope;
|
|
3288
|
-
if (clientBroadcastSignalSequenceNumber === undefined) {
|
|
3289
|
-
return;
|
|
3290
|
-
}
|
|
3291
|
-
|
|
3292
|
-
if (
|
|
3293
|
-
this._signalTracking.trackingSignalSequenceNumber === undefined ||
|
|
3294
|
-
this._signalTracking.minimumTrackingSignalSequenceNumber === undefined
|
|
3295
|
-
) {
|
|
3296
|
-
return;
|
|
3297
|
-
}
|
|
3298
|
-
|
|
3299
|
-
if (
|
|
3300
|
-
clientBroadcastSignalSequenceNumber >= this._signalTracking.trackingSignalSequenceNumber
|
|
3301
|
-
) {
|
|
3302
|
-
// Calculate the number of signals lost and log the event.
|
|
3303
|
-
const signalsLost =
|
|
3304
|
-
clientBroadcastSignalSequenceNumber -
|
|
3305
|
-
this._signalTracking.trackingSignalSequenceNumber;
|
|
3306
|
-
if (signalsLost > 0) {
|
|
3307
|
-
this._signalTracking.signalsLost += signalsLost;
|
|
3308
|
-
this.mc.logger.sendErrorEvent({
|
|
3309
|
-
eventName: "SignalLost",
|
|
3310
|
-
details: {
|
|
3311
|
-
signalsLost, // Number of lost signals detected.
|
|
3312
|
-
expectedSequenceNumber: this._signalTracking.trackingSignalSequenceNumber, // The next expected signal sequence number.
|
|
3313
|
-
clientBroadcastSignalSequenceNumber, // Actual signal sequence number received.
|
|
3314
|
-
},
|
|
3315
|
-
});
|
|
3316
|
-
}
|
|
3317
|
-
// Update the tracking signal sequence number to the next expected signal in the sequence.
|
|
3318
|
-
this._signalTracking.trackingSignalSequenceNumber =
|
|
3319
|
-
clientBroadcastSignalSequenceNumber + 1;
|
|
3320
|
-
} else if (
|
|
3321
|
-
// Check if this is a signal in range of interest.
|
|
3322
|
-
clientBroadcastSignalSequenceNumber >=
|
|
3323
|
-
this._signalTracking.minimumTrackingSignalSequenceNumber
|
|
3324
|
-
) {
|
|
3325
|
-
this._signalTracking.signalsOutOfOrder++;
|
|
3326
|
-
const details: TelemetryEventPropertyTypeExt = {
|
|
3327
|
-
expectedSequenceNumber: this._signalTracking.trackingSignalSequenceNumber, // The next expected signal sequence number.
|
|
3328
|
-
clientBroadcastSignalSequenceNumber, // Sequence number of the out of order signal.
|
|
3329
|
-
};
|
|
3330
|
-
// Only log `contents.type` when address is for container to avoid
|
|
3331
|
-
// chance that contents type is customer data.
|
|
3332
|
-
if (envelopeAddress === undefined) {
|
|
3333
|
-
details.contentsType = envelopeContents.type; // Type of signal that was received out of order.
|
|
3334
|
-
}
|
|
3335
|
-
this.mc.logger.sendTelemetryEvent({
|
|
3336
|
-
eventName: "SignalOutOfOrder",
|
|
3337
|
-
details,
|
|
3338
|
-
});
|
|
3339
|
-
}
|
|
3340
|
-
if (
|
|
3341
|
-
this._signalTracking.roundTripSignalSequenceNumber !== undefined &&
|
|
3342
|
-
clientBroadcastSignalSequenceNumber >= this._signalTracking.roundTripSignalSequenceNumber
|
|
3343
|
-
) {
|
|
3344
|
-
if (
|
|
3345
|
-
clientBroadcastSignalSequenceNumber ===
|
|
3346
|
-
this._signalTracking.roundTripSignalSequenceNumber
|
|
3347
|
-
) {
|
|
3348
|
-
// Latency tracked signal has been received.
|
|
3349
|
-
// We now log the roundtrip duration of the tracked signal.
|
|
3350
|
-
// This telemetry event also logs metrics for broadcast signals
|
|
3351
|
-
// sent, lost, and out of order.
|
|
3352
|
-
// These metrics are reset after logging the telemetry event.
|
|
3353
|
-
this.sendSignalTelemetryEvent();
|
|
3354
|
-
}
|
|
3355
|
-
this._signalTracking.roundTripSignalSequenceNumber = undefined;
|
|
3356
|
-
}
|
|
3357
|
-
}
|
|
3358
|
-
|
|
3359
3011
|
public processSignal(message: ISignalMessage, local: boolean): void {
|
|
3360
3012
|
const envelope = message.content as ISignalEnvelope;
|
|
3361
3013
|
const transformed: IInboundSignalMessage = {
|
|
@@ -3367,7 +3019,11 @@ export class ContainerRuntime
|
|
|
3367
3019
|
|
|
3368
3020
|
// Only collect signal telemetry for broadcast messages sent by the current client.
|
|
3369
3021
|
if (message.clientId === this.clientId) {
|
|
3370
|
-
this.
|
|
3022
|
+
this.signalTelemetryManager.trackReceivedSignal(
|
|
3023
|
+
envelope,
|
|
3024
|
+
this.mc.logger,
|
|
3025
|
+
this.consecutiveReconnects,
|
|
3026
|
+
);
|
|
3371
3027
|
}
|
|
3372
3028
|
|
|
3373
3029
|
if (envelope.address === undefined) {
|
|
@@ -3594,59 +3250,6 @@ export class ContainerRuntime
|
|
|
3594
3250
|
return true;
|
|
3595
3251
|
}
|
|
3596
3252
|
|
|
3597
|
-
private createNewSignalEnvelope(
|
|
3598
|
-
address: string | undefined,
|
|
3599
|
-
type: string,
|
|
3600
|
-
content: unknown,
|
|
3601
|
-
): Omit<ISignalEnvelope, "broadcastSignalSequenceNumber"> {
|
|
3602
|
-
const newEnvelope: Omit<ISignalEnvelope, "broadcastSignalSequenceNumber"> = {
|
|
3603
|
-
address,
|
|
3604
|
-
contents: { type, content },
|
|
3605
|
-
};
|
|
3606
|
-
|
|
3607
|
-
return newEnvelope;
|
|
3608
|
-
}
|
|
3609
|
-
|
|
3610
|
-
private submitEnvelopedSignal(envelope: ISignalEnvelope, targetClientId?: string): void {
|
|
3611
|
-
const isBroadcastSignal = targetClientId === undefined;
|
|
3612
|
-
|
|
3613
|
-
if (isBroadcastSignal) {
|
|
3614
|
-
const clientBroadcastSignalSequenceNumber = ++this._signalTracking
|
|
3615
|
-
.broadcastSignalSequenceNumber;
|
|
3616
|
-
// Stamp with the broadcast signal sequence number.
|
|
3617
|
-
envelope.clientBroadcastSignalSequenceNumber = clientBroadcastSignalSequenceNumber;
|
|
3618
|
-
|
|
3619
|
-
this._signalTracking.signalsSentSinceLastLatencyMeasurement++;
|
|
3620
|
-
|
|
3621
|
-
if (
|
|
3622
|
-
this._signalTracking.minimumTrackingSignalSequenceNumber === undefined ||
|
|
3623
|
-
this._signalTracking.trackingSignalSequenceNumber === undefined
|
|
3624
|
-
) {
|
|
3625
|
-
// Signal monitoring window is undefined
|
|
3626
|
-
// Initialize tracking to expect the next signal sent by the connected client.
|
|
3627
|
-
this._signalTracking.minimumTrackingSignalSequenceNumber =
|
|
3628
|
-
clientBroadcastSignalSequenceNumber;
|
|
3629
|
-
this._signalTracking.trackingSignalSequenceNumber =
|
|
3630
|
-
clientBroadcastSignalSequenceNumber;
|
|
3631
|
-
}
|
|
3632
|
-
|
|
3633
|
-
// We should not track the round trip of a new signal in the case we are already tracking one.
|
|
3634
|
-
if (
|
|
3635
|
-
clientBroadcastSignalSequenceNumber % defaultTelemetrySignalSampleCount === 1 &&
|
|
3636
|
-
this._signalTracking.roundTripSignalSequenceNumber === undefined
|
|
3637
|
-
) {
|
|
3638
|
-
this._signalTracking.signalTimestamp = Date.now();
|
|
3639
|
-
this._signalTracking.roundTripSignalSequenceNumber =
|
|
3640
|
-
clientBroadcastSignalSequenceNumber;
|
|
3641
|
-
this._signalTracking.totalSignalsSentInLatencyWindow +=
|
|
3642
|
-
this._signalTracking.signalsSentSinceLastLatencyMeasurement;
|
|
3643
|
-
this._signalTracking.signalsSentSinceLastLatencyMeasurement = 0;
|
|
3644
|
-
}
|
|
3645
|
-
}
|
|
3646
|
-
|
|
3647
|
-
this.submitSignalFn(envelope, targetClientId);
|
|
3648
|
-
}
|
|
3649
|
-
|
|
3650
3253
|
/**
|
|
3651
3254
|
* Submits the signal to be sent to other clients.
|
|
3652
3255
|
* @param type - Type of the signal.
|
|
@@ -3661,8 +3264,11 @@ export class ContainerRuntime
|
|
|
3661
3264
|
*/
|
|
3662
3265
|
public submitSignal(type: string, content: unknown, targetClientId?: string): void {
|
|
3663
3266
|
this.verifyNotClosed();
|
|
3664
|
-
const envelope =
|
|
3665
|
-
|
|
3267
|
+
const envelope = createNewSignalEnvelope(undefined /* address */, type, content);
|
|
3268
|
+
if (targetClientId === undefined) {
|
|
3269
|
+
this.signalTelemetryManager.applyTrackingToBroadcastSignalEnvelope(envelope);
|
|
3270
|
+
}
|
|
3271
|
+
this.submitSignalFn(envelope, targetClientId);
|
|
3666
3272
|
}
|
|
3667
3273
|
|
|
3668
3274
|
public setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void {
|
|
@@ -3911,13 +3517,12 @@ export class ContainerRuntime
|
|
|
3911
3517
|
* Returns the type of the GC node. Currently, there are nodes that belong to the root ("/"), data stores or
|
|
3912
3518
|
* blob manager.
|
|
3913
3519
|
*/
|
|
3914
|
-
|
|
3520
|
+
|
|
3915
3521
|
public getNodeType(nodePath: string): GCNodeType {
|
|
3916
3522
|
if (isBlobPath(nodePath)) {
|
|
3917
|
-
// eslint-disable-next-line import/no-deprecated
|
|
3918
3523
|
return GCNodeType.Blob;
|
|
3919
3524
|
}
|
|
3920
|
-
|
|
3525
|
+
|
|
3921
3526
|
return this.channelCollection.getGCNodeType(nodePath) ?? GCNodeType.Other;
|
|
3922
3527
|
}
|
|
3923
3528
|
|
|
@@ -3933,13 +3538,12 @@ export class ContainerRuntime
|
|
|
3933
3538
|
}
|
|
3934
3539
|
|
|
3935
3540
|
switch (this.getNodeType(nodePath)) {
|
|
3936
|
-
// eslint-disable-next-line import/no-deprecated
|
|
3937
3541
|
case GCNodeType.Blob: {
|
|
3938
3542
|
return [blobManagerBasePath];
|
|
3939
3543
|
}
|
|
3940
|
-
|
|
3544
|
+
|
|
3941
3545
|
case GCNodeType.DataStore:
|
|
3942
|
-
|
|
3546
|
+
|
|
3943
3547
|
case GCNodeType.SubDataStore: {
|
|
3944
3548
|
return this.channelCollection.getDataStorePackagePath(nodePath);
|
|
3945
3549
|
}
|
|
@@ -3991,7 +3595,6 @@ export class ContainerRuntime
|
|
|
3991
3595
|
fullGC?: boolean;
|
|
3992
3596
|
},
|
|
3993
3597
|
telemetryContext?: ITelemetryContext,
|
|
3994
|
-
// eslint-disable-next-line import/no-deprecated
|
|
3995
3598
|
): Promise<IGCStats | undefined> {
|
|
3996
3599
|
return this.garbageCollector.collectGarbage(options, telemetryContext);
|
|
3997
3600
|
}
|
|
@@ -4034,7 +3637,7 @@ export class ContainerRuntime
|
|
|
4034
3637
|
* op processing, updating SummarizerNode state tracking, and garbage collection.
|
|
4035
3638
|
* @param options - options controlling how the summary is generated or submitted
|
|
4036
3639
|
*/
|
|
4037
|
-
|
|
3640
|
+
|
|
4038
3641
|
public async submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult> {
|
|
4039
3642
|
const {
|
|
4040
3643
|
cancellationToken,
|
|
@@ -4800,7 +4403,7 @@ export class ContainerRuntime
|
|
|
4800
4403
|
/**
|
|
4801
4404
|
* Implementation of ISummarizerInternalsProvider.refreshLatestSummaryAck
|
|
4802
4405
|
*/
|
|
4803
|
-
|
|
4406
|
+
|
|
4804
4407
|
public async refreshLatestSummaryAck(options: IRefreshSummaryAckOptions): Promise<void> {
|
|
4805
4408
|
const { proposalHandle, ackHandle, summaryRefSeq, summaryLogger } = options;
|
|
4806
4409
|
// proposalHandle is always passed from RunningSummarizer.
|
|
@@ -5032,34 +4635,20 @@ export class ContainerRuntime
|
|
|
5032
4635
|
}
|
|
5033
4636
|
}
|
|
5034
4637
|
|
|
5035
|
-
/**
|
|
5036
|
-
* Forms a function that will create and retrieve a Summarizer.
|
|
5037
|
-
*/
|
|
5038
|
-
private formCreateSummarizerFn(loader: ILoader) {
|
|
5039
|
-
return async () => {
|
|
5040
|
-
return createSummarizer(loader, `/${summarizerRequestUrl}`);
|
|
5041
|
-
};
|
|
5042
|
-
}
|
|
5043
|
-
|
|
5044
|
-
private validateSummaryHeuristicConfiguration(
|
|
5045
|
-
configuration: ISummaryConfigurationHeuristics,
|
|
5046
|
-
): void {
|
|
5047
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
5048
|
-
for (const prop in configuration) {
|
|
5049
|
-
if (typeof configuration[prop] === "number" && configuration[prop] < 0) {
|
|
5050
|
-
throw new UsageError(
|
|
5051
|
-
`Summary heuristic configuration property "${prop}" cannot be less than 0`,
|
|
5052
|
-
);
|
|
5053
|
-
}
|
|
5054
|
-
}
|
|
5055
|
-
if (configuration.minIdleTime > configuration.maxIdleTime) {
|
|
5056
|
-
throw new UsageError(
|
|
5057
|
-
`"minIdleTime" [${configuration.minIdleTime}] cannot be greater than "maxIdleTime" [${configuration.maxIdleTime}]`,
|
|
5058
|
-
);
|
|
5059
|
-
}
|
|
5060
|
-
}
|
|
5061
|
-
|
|
5062
4638
|
private get groupedBatchingEnabled(): boolean {
|
|
5063
4639
|
return this.sessionSchema.opGroupingEnabled === true;
|
|
5064
4640
|
}
|
|
5065
4641
|
}
|
|
4642
|
+
|
|
4643
|
+
export function createNewSignalEnvelope(
|
|
4644
|
+
address: string | undefined,
|
|
4645
|
+
type: string,
|
|
4646
|
+
content: unknown,
|
|
4647
|
+
): Omit<ISignalEnvelope, "broadcastSignalSequenceNumber"> {
|
|
4648
|
+
const newEnvelope: Omit<ISignalEnvelope, "broadcastSignalSequenceNumber"> = {
|
|
4649
|
+
address,
|
|
4650
|
+
contents: { type, content },
|
|
4651
|
+
};
|
|
4652
|
+
|
|
4653
|
+
return newEnvelope;
|
|
4654
|
+
}
|