@fluidframework/container-runtime 2.0.0-internal.5.3.1 → 2.0.0-internal.5.4.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 +9 -0
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +9 -1
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +55 -12
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +2 -2
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +43 -11
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +189 -137
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.js +3 -0
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +24 -27
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.js +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStores.d.ts +1 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +14 -24
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/dist/deltaManagerSummarizerProxy.js +2 -0
- package/dist/deltaManagerSummarizerProxy.js.map +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +5 -5
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +12 -5
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +1 -0
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +1 -0
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +15 -22
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/id-compressor/idCompressor.d.ts +3 -3
- package/dist/id-compressor/idCompressor.d.ts.map +1 -1
- package/dist/id-compressor/idCompressor.js +3 -1
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +2 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +1 -1
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +2 -2
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +1 -1
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +2 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +1 -1
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +6 -5
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +5 -12
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +7 -1
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +4 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +21 -12
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +1 -1
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +3 -5
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +10 -28
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.js +1 -1
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +5 -5
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +7 -10
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -3
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +4 -8
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +5 -1
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +2 -3
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +6 -2
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +9 -1
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +55 -12
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +3 -3
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +43 -11
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +188 -137
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.js +3 -0
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +26 -29
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.js +2 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStores.d.ts +1 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +15 -25
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/lib/deltaManagerSummarizerProxy.js +2 -0
- package/lib/deltaManagerSummarizerProxy.js.map +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +6 -6
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +13 -6
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +1 -0
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +1 -0
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +16 -23
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/id-compressor/idCompressor.d.ts +3 -3
- package/lib/id-compressor/idCompressor.d.ts.map +1 -1
- package/lib/id-compressor/idCompressor.js +3 -1
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +2 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +2 -2
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +2 -2
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +2 -2
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +2 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +2 -2
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +6 -5
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +6 -13
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +7 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +4 -1
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +21 -12
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +2 -2
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +2 -2
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +3 -5
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +11 -29
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.js +2 -2
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +5 -5
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +8 -11
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +5 -9
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +6 -2
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +2 -3
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +7 -3
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +16 -16
- package/src/batchTracker.ts +2 -2
- package/src/blobManager.ts +70 -13
- package/src/connectionTelemetry.ts +7 -3
- package/src/containerRuntime.ts +287 -150
- package/src/dataStore.ts +3 -0
- package/src/dataStoreContext.ts +31 -33
- package/src/dataStoreContexts.ts +2 -2
- package/src/dataStores.ts +15 -18
- package/src/deltaManagerSummarizerProxy.ts +2 -0
- package/src/deltaScheduler.ts +6 -10
- package/src/gc/garbageCollection.ts +13 -8
- package/src/gc/gcHelpers.ts +1 -0
- package/src/gc/gcTelemetry.ts +12 -8
- package/src/id-compressor/idCompressor.ts +6 -5
- package/src/opLifecycle/opCompressor.ts +4 -3
- package/src/opLifecycle/opDecompressor.ts +4 -3
- package/src/opLifecycle/opSplitter.ts +4 -3
- package/src/opLifecycle/outbox.ts +13 -25
- package/src/opLifecycle/remoteMessageProcessor.ts +8 -2
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +22 -10
- package/src/scheduleManager.ts +2 -2
- package/src/summary/orderedClientElection.ts +2 -2
- package/src/summary/runningSummarizer.ts +18 -44
- package/src/summary/summarizer.ts +2 -2
- package/src/summary/summarizerNode/summarizerNode.ts +13 -15
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +8 -7
- package/src/summary/summaryGenerator.ts +6 -2
- package/src/summary/summaryManager.ts +9 -5
package/src/dataStore.ts
CHANGED
|
@@ -62,6 +62,9 @@ class DataStore implements IDataStore {
|
|
|
62
62
|
private readonly pendingAliases: Map<string, Promise<AliasResult>>;
|
|
63
63
|
private aliasResult: Promise<AliasResult> | undefined;
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IDataStore.trySetAlias}
|
|
67
|
+
*/
|
|
65
68
|
async trySetAlias(alias: string): Promise<AliasResult> {
|
|
66
69
|
if (alias.includes("/")) {
|
|
67
70
|
throw new UsageError(`The alias cannot contain slashes: '${alias}'`);
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -54,19 +54,14 @@ import {
|
|
|
54
54
|
IIdCompressorCore,
|
|
55
55
|
VisibilityState,
|
|
56
56
|
} from "@fluidframework/runtime-definitions";
|
|
57
|
+
import { addBlobToSummary, convertSummaryTreeToITree } from "@fluidframework/runtime-utils";
|
|
57
58
|
import {
|
|
58
|
-
|
|
59
|
-
convertSummaryTreeToITree,
|
|
60
|
-
packagePathToTelemetryProperty,
|
|
61
|
-
} from "@fluidframework/runtime-utils";
|
|
62
|
-
import {
|
|
63
|
-
ChildLogger,
|
|
59
|
+
createChildMonitoringContext,
|
|
64
60
|
generateStack,
|
|
65
61
|
ITelemetryLoggerExt,
|
|
66
|
-
loggerToMonitoringContext,
|
|
67
62
|
LoggingError,
|
|
68
63
|
MonitoringContext,
|
|
69
|
-
|
|
64
|
+
tagCodeArtifacts,
|
|
70
65
|
ThresholdCounter,
|
|
71
66
|
} from "@fluidframework/telemetry-utils";
|
|
72
67
|
import {
|
|
@@ -316,9 +311,16 @@ export abstract class FluidDataStoreContext
|
|
|
316
311
|
async (fullGC?: boolean) => this.getGCDataInternal(fullGC),
|
|
317
312
|
);
|
|
318
313
|
|
|
319
|
-
this.mc =
|
|
320
|
-
|
|
321
|
-
|
|
314
|
+
this.mc = createChildMonitoringContext({
|
|
315
|
+
logger: this.logger,
|
|
316
|
+
namespace: "FluidDataStoreContext",
|
|
317
|
+
properties: {
|
|
318
|
+
all: tagCodeArtifacts({
|
|
319
|
+
fluidDataStoreId: this.id,
|
|
320
|
+
fullPackageName: this.pkg?.join("/"),
|
|
321
|
+
}),
|
|
322
|
+
},
|
|
323
|
+
});
|
|
322
324
|
this.thresholdOpsCounter = new ThresholdCounter(
|
|
323
325
|
FluidDataStoreContext.pendingOpsCountThreshold,
|
|
324
326
|
this.mc.logger,
|
|
@@ -374,10 +376,13 @@ export abstract class FluidDataStoreContext
|
|
|
374
376
|
failedPkgPath?: string,
|
|
375
377
|
fullPackageName?: readonly string[],
|
|
376
378
|
): never {
|
|
377
|
-
throw new LoggingError(
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
throw new LoggingError(
|
|
380
|
+
reason,
|
|
381
|
+
tagCodeArtifacts({
|
|
382
|
+
failedPkgPath,
|
|
383
|
+
packagePath: fullPackageName?.join("/"),
|
|
384
|
+
}),
|
|
385
|
+
);
|
|
381
386
|
}
|
|
382
387
|
|
|
383
388
|
public async realize(): Promise<IFluidDataStoreChannel> {
|
|
@@ -389,13 +394,12 @@ export abstract class FluidDataStoreContext
|
|
|
389
394
|
error,
|
|
390
395
|
"realizeFluidDataStoreContext",
|
|
391
396
|
);
|
|
392
|
-
errorWrapped.addTelemetryProperties(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
});
|
|
397
|
+
errorWrapped.addTelemetryProperties(
|
|
398
|
+
tagCodeArtifacts({
|
|
399
|
+
fullPackageName: this.pkg?.join("/"),
|
|
400
|
+
fluidDataStoreId: this.id,
|
|
401
|
+
}),
|
|
402
|
+
);
|
|
399
403
|
this.channelDeferred?.reject(errorWrapped);
|
|
400
404
|
this.mc.logger.sendErrorEvent({ eventName: "RealizeError" }, errorWrapped);
|
|
401
405
|
});
|
|
@@ -790,10 +794,6 @@ export abstract class FluidDataStoreContext
|
|
|
790
794
|
this.mc.logger.sendErrorEvent(
|
|
791
795
|
{
|
|
792
796
|
eventName: "BindRuntimeError",
|
|
793
|
-
fluidDataStoreId: {
|
|
794
|
-
value: this.id,
|
|
795
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
796
|
-
},
|
|
797
797
|
},
|
|
798
798
|
error,
|
|
799
799
|
);
|
|
@@ -917,11 +917,6 @@ export abstract class FluidDataStoreContext
|
|
|
917
917
|
this.mc.logger.sendTelemetryEvent({
|
|
918
918
|
eventName,
|
|
919
919
|
type,
|
|
920
|
-
fluidDataStoreId: {
|
|
921
|
-
value: this.id,
|
|
922
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
923
|
-
},
|
|
924
|
-
packageName: packagePathToTelemetryProperty(this.pkg),
|
|
925
920
|
isSummaryInProgress: this.summarizerNode.isSummaryInProgress?.(),
|
|
926
921
|
stack: generateStack(),
|
|
927
922
|
});
|
|
@@ -943,8 +938,11 @@ export abstract class FluidDataStoreContext
|
|
|
943
938
|
);
|
|
944
939
|
}
|
|
945
940
|
|
|
946
|
-
public async uploadBlob(
|
|
947
|
-
|
|
941
|
+
public async uploadBlob(
|
|
942
|
+
blob: ArrayBufferLike,
|
|
943
|
+
signal?: AbortSignal,
|
|
944
|
+
): Promise<IFluidHandle<ArrayBufferLike>> {
|
|
945
|
+
return this.containerRuntime.uploadBlob(blob, signal);
|
|
948
946
|
}
|
|
949
947
|
}
|
|
950
948
|
|
package/src/dataStoreContexts.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { ITelemetryBaseLogger } from "@fluidframework/common-definitions";
|
|
|
7
7
|
import { assert, Deferred } from "@fluidframework/common-utils";
|
|
8
8
|
import { Lazy } from "@fluidframework/core-utils";
|
|
9
9
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
10
|
-
import {
|
|
10
|
+
import { createChildLogger, ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
11
11
|
import { FluidDataStoreContext, LocalFluidDataStoreContext } from "./dataStoreContext";
|
|
12
12
|
|
|
13
13
|
export class DataStoreContexts implements Iterable<[string, FluidDataStoreContext]>, IDisposable {
|
|
@@ -47,7 +47,7 @@ export class DataStoreContexts implements Iterable<[string, FluidDataStoreContex
|
|
|
47
47
|
private readonly _logger: ITelemetryLoggerExt;
|
|
48
48
|
|
|
49
49
|
constructor(baseLogger: ITelemetryBaseLogger) {
|
|
50
|
-
this._logger =
|
|
50
|
+
this._logger = createChildLogger({ logger: baseLogger });
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
[Symbol.iterator](): Iterator<[string, FluidDataStoreContext]> {
|
package/src/dataStores.ts
CHANGED
|
@@ -42,11 +42,10 @@ import {
|
|
|
42
42
|
unpackChildNodesUsedRoutes,
|
|
43
43
|
} from "@fluidframework/runtime-utils";
|
|
44
44
|
import {
|
|
45
|
-
ChildLogger,
|
|
46
|
-
loggerToMonitoringContext,
|
|
47
45
|
LoggingError,
|
|
48
46
|
MonitoringContext,
|
|
49
|
-
|
|
47
|
+
createChildMonitoringContext,
|
|
48
|
+
tagCodeArtifacts,
|
|
50
49
|
} from "@fluidframework/telemetry-utils";
|
|
51
50
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
52
51
|
import { buildSnapshotTree } from "@fluidframework/driver-utils";
|
|
@@ -137,7 +136,7 @@ export class DataStores implements IDisposable {
|
|
|
137
136
|
private readonly aliasMap: Map<string, string>,
|
|
138
137
|
private readonly contexts: DataStoreContexts = new DataStoreContexts(baseLogger),
|
|
139
138
|
) {
|
|
140
|
-
this.mc =
|
|
139
|
+
this.mc = createChildMonitoringContext({ logger: baseLogger });
|
|
141
140
|
this.containerRuntimeHandle = new FluidObjectHandle(
|
|
142
141
|
this.runtime,
|
|
143
142
|
"/",
|
|
@@ -243,10 +242,7 @@ export class DataStores implements IDisposable {
|
|
|
243
242
|
"Duplicate DataStore created with existing id",
|
|
244
243
|
{
|
|
245
244
|
...extractSafePropertiesFromMessage(message),
|
|
246
|
-
dataStoreId:
|
|
247
|
-
value: attachMessage.id,
|
|
248
|
-
tag: TelemetryDataTag.CodeArtifact,
|
|
249
|
-
},
|
|
245
|
+
...tagCodeArtifacts({ dataStoreId: attachMessage.id }),
|
|
250
246
|
},
|
|
251
247
|
);
|
|
252
248
|
throw error;
|
|
@@ -550,19 +546,18 @@ export class DataStores implements IDisposable {
|
|
|
550
546
|
}
|
|
551
547
|
}
|
|
552
548
|
|
|
553
|
-
public processSignal(
|
|
554
|
-
const request = { url:
|
|
555
|
-
this.validateNotDeleted(
|
|
556
|
-
const context = this.contexts.get(
|
|
549
|
+
public processSignal(fluidDataStoreId: string, message: IInboundSignalMessage, local: boolean) {
|
|
550
|
+
const request = { url: fluidDataStoreId };
|
|
551
|
+
this.validateNotDeleted(fluidDataStoreId, request);
|
|
552
|
+
const context = this.contexts.get(fluidDataStoreId);
|
|
557
553
|
if (!context) {
|
|
558
554
|
// Attach message may not have been processed yet
|
|
559
555
|
assert(!local, 0x163 /* "Missing datastore for local signal" */);
|
|
560
556
|
this.mc.logger.sendTelemetryEvent({
|
|
561
557
|
eventName: "SignalFluidDataStoreNotFound",
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
},
|
|
558
|
+
...tagCodeArtifacts({
|
|
559
|
+
fluidDataStoreId,
|
|
560
|
+
}),
|
|
566
561
|
});
|
|
567
562
|
return;
|
|
568
563
|
}
|
|
@@ -571,7 +566,7 @@ export class DataStores implements IDisposable {
|
|
|
571
566
|
}
|
|
572
567
|
|
|
573
568
|
public setConnectionState(connected: boolean, clientId?: string) {
|
|
574
|
-
for (const [
|
|
569
|
+
for (const [fluidDataStoreId, context] of this.contexts) {
|
|
575
570
|
try {
|
|
576
571
|
context.setConnectionState(connected, clientId);
|
|
577
572
|
} catch (error) {
|
|
@@ -579,7 +574,9 @@ export class DataStores implements IDisposable {
|
|
|
579
574
|
{
|
|
580
575
|
eventName: "SetConnectionStateError",
|
|
581
576
|
clientId,
|
|
582
|
-
|
|
577
|
+
...tagCodeArtifacts({
|
|
578
|
+
fluidDataStoreId,
|
|
579
|
+
}),
|
|
583
580
|
details: JSON.stringify({
|
|
584
581
|
runtimeConnected: this.runtime.connected,
|
|
585
582
|
connected,
|
|
@@ -41,6 +41,8 @@ export class DeltaManagerSummarizerProxy
|
|
|
41
41
|
|
|
42
42
|
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>) {
|
|
43
43
|
super(deltaManager);
|
|
44
|
+
// We are expecting this class to have many listeners, so we suppress noisy "MaxListenersExceededWarning" logging.
|
|
45
|
+
super.setMaxListeners(0);
|
|
44
46
|
this.isSummarizerClient = this.deltaManager.clientDetails.type === summarizerClientType;
|
|
45
47
|
}
|
|
46
48
|
}
|
package/src/deltaScheduler.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryLoggerExt,
|
|
6
|
+
import { ITelemetryLoggerExt, formatTick } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { performance } from "@fluidframework/common-utils";
|
|
8
8
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
9
9
|
import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
@@ -111,20 +111,16 @@ export class DeltaScheduler {
|
|
|
111
111
|
if (this.schedulingLog) {
|
|
112
112
|
this.logger.sendTelemetryEvent({
|
|
113
113
|
eventName: "InboundOpsPartialProcessingTime",
|
|
114
|
-
duration:
|
|
114
|
+
duration: formatTick(elapsedTime),
|
|
115
115
|
opsProcessed:
|
|
116
116
|
this.schedulingLog.lastSequenceNumber -
|
|
117
117
|
this.schedulingLog.firstSequenceNumber +
|
|
118
118
|
1,
|
|
119
119
|
opsRemainingToProcess: this.deltaManager.inbound.length,
|
|
120
|
-
processingTime:
|
|
121
|
-
this.schedulingLog.totalProcessingTime,
|
|
122
|
-
),
|
|
120
|
+
processingTime: formatTick(this.schedulingLog.totalProcessingTime),
|
|
123
121
|
numberOfTurns: this.schedulingLog.numberOfTurns,
|
|
124
122
|
batchesProcessed: this.schedulingLog.numberOfBatchesProcessed,
|
|
125
|
-
timeToResume:
|
|
126
|
-
performance.now() - currentTime,
|
|
127
|
-
),
|
|
123
|
+
timeToResume: formatTick(performance.now() - currentTime),
|
|
128
124
|
});
|
|
129
125
|
}
|
|
130
126
|
this.deltaManager.inbound.resume();
|
|
@@ -147,13 +143,13 @@ export class DeltaScheduler {
|
|
|
147
143
|
eventName: "InboundOpsProcessingTime",
|
|
148
144
|
opsRemainingToProcess: this.schedulingLog.opsRemainingToProcess,
|
|
149
145
|
numberOfTurns: this.schedulingLog.numberOfTurns,
|
|
150
|
-
processingTime:
|
|
146
|
+
processingTime: formatTick(this.schedulingLog.totalProcessingTime),
|
|
151
147
|
opsProcessed:
|
|
152
148
|
this.schedulingLog.lastSequenceNumber -
|
|
153
149
|
this.schedulingLog.firstSequenceNumber +
|
|
154
150
|
1,
|
|
155
151
|
batchesProcessed: this.schedulingLog.numberOfBatchesProcessed,
|
|
156
|
-
duration:
|
|
152
|
+
duration: formatTick(currentTime - this.schedulingLog.startTime),
|
|
157
153
|
schedulingCount: this.schedulingCount,
|
|
158
154
|
});
|
|
159
155
|
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
} from "@fluidframework/runtime-definitions";
|
|
17
17
|
import { ReadAndParseBlob } from "@fluidframework/runtime-utils";
|
|
18
18
|
import {
|
|
19
|
-
|
|
19
|
+
createChildLogger,
|
|
20
|
+
createChildMonitoringContext,
|
|
20
21
|
ITelemetryLoggerExt,
|
|
21
|
-
loggerToMonitoringContext,
|
|
22
22
|
MonitoringContext,
|
|
23
23
|
PerformanceEvent,
|
|
24
24
|
} from "@fluidframework/telemetry-utils";
|
|
@@ -137,11 +137,13 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
137
137
|
const baseSnapshot = createParams.baseSnapshot;
|
|
138
138
|
const readAndParseBlob = createParams.readAndParseBlob;
|
|
139
139
|
|
|
140
|
-
this.mc =
|
|
141
|
-
|
|
140
|
+
this.mc = createChildMonitoringContext({
|
|
141
|
+
logger: createParams.baseLogger,
|
|
142
|
+
namespace: "GarbageCollector",
|
|
143
|
+
properties: {
|
|
142
144
|
all: { completedGCRuns: () => this.completedRuns },
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
+
},
|
|
146
|
+
});
|
|
145
147
|
|
|
146
148
|
this.configs = generateGCConfigs(this.mc, createParams);
|
|
147
149
|
|
|
@@ -466,8 +468,11 @@ export class GarbageCollector implements IGarbageCollector {
|
|
|
466
468
|
});
|
|
467
469
|
|
|
468
470
|
const logger = options.logger
|
|
469
|
-
?
|
|
470
|
-
|
|
471
|
+
? createChildLogger({
|
|
472
|
+
logger: options.logger,
|
|
473
|
+
properties: {
|
|
474
|
+
all: { completedGCRuns: () => this.completedRuns },
|
|
475
|
+
},
|
|
471
476
|
})
|
|
472
477
|
: this.mc.logger;
|
|
473
478
|
|
package/src/gc/gcHelpers.ts
CHANGED
|
@@ -307,6 +307,7 @@ export function trimLeadingAndTrailingSlashes(str: string) {
|
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
309
|
* Tags the passed value as a CodeArtifact and returns the tagged value.
|
|
310
|
+
* @deprecated - Use telemetry-utils tagCodeArtifacts instead
|
|
310
311
|
*/
|
|
311
312
|
export function tagAsCodeArtifact(value: string) {
|
|
312
313
|
return {
|
package/src/gc/gcTelemetry.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
generateStack,
|
|
11
11
|
ITelemetryLoggerExt,
|
|
12
12
|
MonitoringContext,
|
|
13
|
+
tagCodeArtifacts,
|
|
13
14
|
} from "@fluidframework/telemetry-utils";
|
|
14
15
|
import { ICreateContainerMetadata } from "../summary";
|
|
15
16
|
import {
|
|
@@ -161,7 +162,6 @@ export class GCTelemetryTracker {
|
|
|
161
162
|
const { usageType, currentReferenceTimestampMs, packagePath, id, fromId, ...propsToLog } =
|
|
162
163
|
nodeUsageProps;
|
|
163
164
|
const eventProps: Omit<IUnreferencedEventProps, "state" | "usageType"> = {
|
|
164
|
-
id: tagAsCodeArtifact(id),
|
|
165
165
|
type: nodeType,
|
|
166
166
|
unrefTime: nodeStateTracker.unreferencedTimestampMs,
|
|
167
167
|
age:
|
|
@@ -171,7 +171,7 @@ export class GCTelemetryTracker {
|
|
|
171
171
|
state === UnreferencedState.Inactive
|
|
172
172
|
? this.configs.inactiveTimeoutMs
|
|
173
173
|
: this.configs.sweepTimeoutMs,
|
|
174
|
-
|
|
174
|
+
...tagCodeArtifacts({ id, fromId }),
|
|
175
175
|
...propsToLog,
|
|
176
176
|
...this.createContainerMetadata,
|
|
177
177
|
};
|
|
@@ -277,8 +277,10 @@ export class GCTelemetryTracker {
|
|
|
277
277
|
if (missingExplicitRoutes.length > 0) {
|
|
278
278
|
logger.sendErrorEvent({
|
|
279
279
|
eventName: "gcUnknownOutboundReferences",
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
...tagCodeArtifacts({
|
|
281
|
+
id: nodeId,
|
|
282
|
+
routes: JSON.stringify(missingExplicitRoutes),
|
|
283
|
+
}),
|
|
282
284
|
});
|
|
283
285
|
}
|
|
284
286
|
}
|
|
@@ -318,8 +320,10 @@ export class GCTelemetryTracker {
|
|
|
318
320
|
}),
|
|
319
321
|
id,
|
|
320
322
|
fromId,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
+
...tagCodeArtifacts({
|
|
324
|
+
pkg: pkg?.join("/"),
|
|
325
|
+
fromPkg: fromPkg?.join("/"),
|
|
326
|
+
}),
|
|
323
327
|
};
|
|
324
328
|
|
|
325
329
|
if (state === UnreferencedState.Inactive) {
|
|
@@ -379,7 +383,7 @@ export class GCTelemetryTracker {
|
|
|
379
383
|
lastSummaryTime,
|
|
380
384
|
...this.createContainerMetadata,
|
|
381
385
|
}),
|
|
382
|
-
id:
|
|
386
|
+
...tagCodeArtifacts({ id: JSON.stringify(deletedNodeIds) }),
|
|
383
387
|
});
|
|
384
388
|
}
|
|
385
389
|
}
|
|
@@ -398,7 +402,7 @@ export function sendGCUnexpectedUsageEvent(
|
|
|
398
402
|
packagePath: readonly string[] | undefined,
|
|
399
403
|
error?: unknown,
|
|
400
404
|
) {
|
|
401
|
-
event.pkg =
|
|
405
|
+
event.pkg = tagCodeArtifacts({ pkg: packagePath?.join("/") })?.pkg;
|
|
402
406
|
event.tombstoneFlags = JSON.stringify({
|
|
403
407
|
DisableTombstone: mc.config.getBoolean(disableTombstoneKey),
|
|
404
408
|
ThrowOnTombstoneUsage: mc.config.getBoolean(throwOnTombstoneUsageKey),
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
|
7
7
|
|
|
8
|
-
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
9
8
|
import { assert } from "@fluidframework/common-utils";
|
|
10
9
|
import {
|
|
11
10
|
IIdCompressor,
|
|
@@ -31,6 +30,8 @@ import type {
|
|
|
31
30
|
VersionedSerializedIdCompressor,
|
|
32
31
|
} from "@fluidframework/runtime-definitions";
|
|
33
32
|
import BTree from "sorted-btree";
|
|
33
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
34
|
+
import { ITelemetryLoggerExt, createChildLogger } from "@fluidframework/telemetry-utils";
|
|
34
35
|
import {
|
|
35
36
|
hasAtLeastLength,
|
|
36
37
|
compareFiniteNumbers,
|
|
@@ -305,15 +306,15 @@ export class IdCompressor implements IIdCompressorCore, IIdCompressor {
|
|
|
305
306
|
private readonly finalIdToCluster: AppendOnlySortedMap<FinalCompressedId, IdCluster> =
|
|
306
307
|
new AppendOnlySortedMap(compareFiniteNumbers);
|
|
307
308
|
|
|
309
|
+
private readonly logger: ITelemetryLoggerExt;
|
|
310
|
+
|
|
308
311
|
/**
|
|
309
312
|
* @param localSessionId - the `IdCompressor`'s current local session ID.
|
|
310
313
|
* {@link generateStableId}.
|
|
311
314
|
*/
|
|
312
|
-
public constructor(
|
|
313
|
-
public readonly localSessionId: SessionId,
|
|
314
|
-
private readonly logger?: ITelemetryLoggerExt,
|
|
315
|
-
) {
|
|
315
|
+
public constructor(public readonly localSessionId: SessionId, logger?: ITelemetryBaseLogger) {
|
|
316
316
|
this.localSession = this.createSession(localSessionId);
|
|
317
|
+
this.logger = createChildLogger({ logger });
|
|
317
318
|
}
|
|
318
319
|
|
|
319
320
|
/**
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { assert, IsoBuffer } from "@fluidframework/common-utils";
|
|
8
8
|
import { UsageError } from "@fluidframework/container-utils";
|
|
9
9
|
import { compress } from "lz4js";
|
|
10
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
10
11
|
import { CompressionAlgorithms } from "../containerRuntime";
|
|
11
12
|
import { estimateSocketSize } from "./batchManager";
|
|
12
13
|
import { IBatch, BatchMessage } from "./definitions";
|
|
@@ -19,8 +20,8 @@ import { IBatch, BatchMessage } from "./definitions";
|
|
|
19
20
|
export class OpCompressor {
|
|
20
21
|
private readonly logger;
|
|
21
22
|
|
|
22
|
-
constructor(logger:
|
|
23
|
-
this.logger =
|
|
23
|
+
constructor(logger: ITelemetryBaseLogger) {
|
|
24
|
+
this.logger = createChildLogger({ logger, namespace: "OpCompressor" });
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
public compressBatch(batch: IBatch): IBatch {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
import { decompress } from "lz4js";
|
|
7
7
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
8
|
import { assert, IsoBuffer, Uint8ArrayToString } from "@fluidframework/common-utils";
|
|
9
|
-
import {
|
|
9
|
+
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
10
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
10
11
|
import { CompressionAlgorithms } from "../containerRuntime";
|
|
11
12
|
import { IBatchMetadata } from "../metadata";
|
|
12
13
|
import { IMessageProcessingResult } from "./definitions";
|
|
@@ -32,8 +33,8 @@ export class OpDecompressor {
|
|
|
32
33
|
private processedCount = 0;
|
|
33
34
|
private readonly logger;
|
|
34
35
|
|
|
35
|
-
constructor(logger:
|
|
36
|
-
this.logger =
|
|
36
|
+
constructor(logger: ITelemetryBaseLogger) {
|
|
37
|
+
this.logger = createChildLogger({ logger, namespace: "OpDecompressor" });
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
public processMessage(message: ISequencedDocumentMessage): IMessageProcessingResult {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
7
7
|
import { assert } from "@fluidframework/common-utils";
|
|
8
8
|
import { IBatchMessage } from "@fluidframework/container-definitions";
|
|
9
9
|
import {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
extractSafePropertiesFromMessage,
|
|
12
12
|
} from "@fluidframework/container-utils";
|
|
13
13
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
14
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
14
15
|
import { ContainerMessageType, ContainerRuntimeMessage } from "../containerRuntime";
|
|
15
16
|
import { estimateSocketSize } from "./batchManager";
|
|
16
17
|
import { BatchMessage, IBatch, IChunkedOp, IMessageProcessingResult } from "./definitions";
|
|
@@ -30,10 +31,10 @@ export class OpSplitter {
|
|
|
30
31
|
| undefined,
|
|
31
32
|
public readonly chunkSizeInBytes: number,
|
|
32
33
|
private readonly maxBatchSizeInBytes: number,
|
|
33
|
-
logger:
|
|
34
|
+
logger: ITelemetryBaseLogger,
|
|
34
35
|
) {
|
|
35
36
|
this.chunkMap = new Map<string, string[]>(chunks);
|
|
36
|
-
this.logger =
|
|
37
|
+
this.logger = createChildLogger({ logger, namespace: "OpSplitter" });
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
public get isBatchChunkingEnabled(): boolean {
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
ITelemetryLoggerExt,
|
|
8
|
-
ChildLogger,
|
|
9
|
-
loggerToMonitoringContext,
|
|
10
|
-
MonitoringContext,
|
|
11
|
-
} from "@fluidframework/telemetry-utils";
|
|
6
|
+
import { createChildMonitoringContext, MonitoringContext } from "@fluidframework/telemetry-utils";
|
|
12
7
|
import { assert } from "@fluidframework/common-utils";
|
|
13
|
-
import {
|
|
8
|
+
import { IBatchMessage, ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
14
9
|
import { GenericError, UsageError } from "@fluidframework/container-utils";
|
|
15
|
-
import {
|
|
10
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
16
11
|
import { ICompressionRuntimeOptions } from "../containerRuntime";
|
|
17
12
|
import { IPendingBatchMessage, PendingStateManager } from "../pendingStateManager";
|
|
18
13
|
import {
|
|
@@ -37,11 +32,14 @@ export interface IOutboxConfig {
|
|
|
37
32
|
export interface IOutboxParameters {
|
|
38
33
|
readonly shouldSend: () => boolean;
|
|
39
34
|
readonly pendingStateManager: PendingStateManager;
|
|
40
|
-
readonly
|
|
35
|
+
readonly submitBatchFn:
|
|
36
|
+
| ((batch: IBatchMessage[], referenceSequenceNumber?: number) => number)
|
|
37
|
+
| undefined;
|
|
38
|
+
readonly legacySendBatchFn: (batch: IBatch) => void;
|
|
41
39
|
readonly config: IOutboxConfig;
|
|
42
40
|
readonly compressor: OpCompressor;
|
|
43
41
|
readonly splitter: OpSplitter;
|
|
44
|
-
readonly logger:
|
|
42
|
+
readonly logger: ITelemetryBaseLogger;
|
|
45
43
|
readonly groupingManager: OpGroupingManager;
|
|
46
44
|
readonly getCurrentSequenceNumbers: () => BatchSequenceNumbers;
|
|
47
45
|
readonly reSubmit: (message: IPendingBatchMessage) => void;
|
|
@@ -100,7 +98,7 @@ export class Outbox {
|
|
|
100
98
|
private mismatchedOpsReported = 0;
|
|
101
99
|
|
|
102
100
|
constructor(private readonly params: IOutboxParameters) {
|
|
103
|
-
this.mc =
|
|
101
|
+
this.mc = createChildMonitoringContext({ logger: params.logger, namespace: "Outbox" });
|
|
104
102
|
const isCompressionEnabled =
|
|
105
103
|
this.params.config.compressionOptions.minimumBatchSizeInBytes !==
|
|
106
104
|
Number.POSITIVE_INFINITY;
|
|
@@ -326,7 +324,7 @@ export class Outbox {
|
|
|
326
324
|
this.params.config.compressionOptions === undefined ||
|
|
327
325
|
this.params.config.compressionOptions.minimumBatchSizeInBytes >
|
|
328
326
|
batch.contentSizeInBytes ||
|
|
329
|
-
this.params.
|
|
327
|
+
this.params.submitBatchFn === undefined
|
|
330
328
|
) {
|
|
331
329
|
// Nothing to do if the batch is empty or if compression is disabled or not supported, or if we don't need to compress
|
|
332
330
|
return disableGroupedBatching ? batch : this.params.groupingManager.groupBatch(batch);
|
|
@@ -381,7 +379,7 @@ export class Outbox {
|
|
|
381
379
|
});
|
|
382
380
|
}
|
|
383
381
|
|
|
384
|
-
if (this.params.
|
|
382
|
+
if (this.params.submitBatchFn === undefined) {
|
|
385
383
|
// Legacy path - supporting old loader versions. Can be removed only when LTS moves above
|
|
386
384
|
// version that has support for batches (submitBatchFn)
|
|
387
385
|
assert(
|
|
@@ -389,23 +387,13 @@ export class Outbox {
|
|
|
389
387
|
0x5a6 /* Compression should not have happened if the loader does not support it */,
|
|
390
388
|
);
|
|
391
389
|
|
|
392
|
-
|
|
393
|
-
this.params.containerContext.submitFn(
|
|
394
|
-
MessageType.Operation,
|
|
395
|
-
// For back-compat (submitFn only works on deserialized content)
|
|
396
|
-
message.contents === undefined ? undefined : JSON.parse(message.contents),
|
|
397
|
-
true, // batch
|
|
398
|
-
message.metadata,
|
|
399
|
-
);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
this.params.containerContext.deltaManager.flush();
|
|
390
|
+
this.params.legacySendBatchFn(batch);
|
|
403
391
|
} else {
|
|
404
392
|
assert(
|
|
405
393
|
batch.referenceSequenceNumber !== undefined,
|
|
406
394
|
0x58e /* Batch must not be empty */,
|
|
407
395
|
);
|
|
408
|
-
this.params.
|
|
396
|
+
this.params.submitBatchFn(
|
|
409
397
|
batch.content.map((message) => ({
|
|
410
398
|
contents: message.contents,
|
|
411
399
|
metadata: message.metadata,
|
|
@@ -24,6 +24,11 @@ export class RemoteMessageProcessor {
|
|
|
24
24
|
this.opSplitter.clearPartialChunks(clientId);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Ungroups and Unchunks the runtime ops encapsulated by the single remoteMessage received over the wire
|
|
29
|
+
* @param remoteMessage - A message from another client, likely a chunked/grouped op
|
|
30
|
+
* @returns the ungrouped, unchunked, unpacked SequencedContainerRuntimeMessage encapsulated in the remote message
|
|
31
|
+
*/
|
|
27
32
|
public process(remoteMessage: ISequencedDocumentMessage): ISequencedDocumentMessage[] {
|
|
28
33
|
const result: ISequencedDocumentMessage[] = [];
|
|
29
34
|
|
|
@@ -32,11 +37,12 @@ export class RemoteMessageProcessor {
|
|
|
32
37
|
const message = this.opDecompressor.processMessage(ungroupedMessage).message;
|
|
33
38
|
|
|
34
39
|
for (let ungroupedMessage2 of this.opGroupingManager.ungroupOp(message)) {
|
|
40
|
+
// unpack and unchunk the ungrouped message in place
|
|
35
41
|
unpackRuntimeMessage(ungroupedMessage2);
|
|
36
|
-
|
|
37
42
|
const chunkProcessingResult =
|
|
38
43
|
this.opSplitter.processRemoteMessage(ungroupedMessage2);
|
|
39
44
|
ungroupedMessage2 = chunkProcessingResult.message;
|
|
45
|
+
|
|
40
46
|
if (chunkProcessingResult.state !== "Processed") {
|
|
41
47
|
// If the message is not chunked or if the splitter is still rebuilding the original message,
|
|
42
48
|
// there is no need to continue processing
|
|
@@ -106,7 +112,7 @@ const unpack = (message: ISequencedDocumentMessage) => {
|
|
|
106
112
|
*
|
|
107
113
|
* @remarks This API makes no promises regarding backward-compatibility. This is internal API.
|
|
108
114
|
* @param message - message (as it observed in storage / service)
|
|
109
|
-
* @returns
|
|
115
|
+
* @returns whether the given message was unpacked
|
|
110
116
|
*
|
|
111
117
|
* @internal
|
|
112
118
|
*/
|
package/src/packageVersion.ts
CHANGED