@fluidframework/container-runtime 2.11.0 → 2.12.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 +37 -0
- package/api-report/container-runtime.legacy.alpha.api.md +17 -15
- package/container-runtime.test-files.tar +0 -0
- package/dist/containerRuntime.d.ts +38 -5
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +28 -7
- package/dist/containerRuntime.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +2 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +8 -1
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +70 -8
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +5 -2
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +39 -6
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +8 -4
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +5 -2
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +23 -6
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +38 -5
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +28 -7
- package/lib/containerRuntime.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +2 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +8 -1
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +70 -8
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +5 -2
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +39 -6
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +8 -4
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +5 -2
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +23 -6
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +19 -19
- package/src/containerRuntime.ts +82 -23
- package/src/index.ts +1 -0
- package/src/packageVersion.ts +1 -1
- package/src/summary/runWhileConnectedCoordinator.ts +2 -5
- package/src/summary/runningSummarizer.ts +82 -11
- package/src/summary/summarizer.ts +49 -10
- package/src/summary/summarizerTypes.ts +11 -4
- package/src/summary/summaryManager.ts +30 -10
package/lib/containerRuntime.js
CHANGED
|
@@ -255,6 +255,10 @@ export async function loadContainerRuntime(params) {
|
|
|
255
255
|
/**
|
|
256
256
|
* Represents the runtime of the container. Contains helper functions/state of the container.
|
|
257
257
|
* It will define the store level mappings.
|
|
258
|
+
*
|
|
259
|
+
* @deprecated To be removed from the Legacy-Alpha API in version 2.20.0.
|
|
260
|
+
* Use the loadContainerRuntime function and interfaces IContainerRuntime / IRuntime instead.
|
|
261
|
+
*
|
|
258
262
|
* @legacy
|
|
259
263
|
* @alpha
|
|
260
264
|
*/
|
|
@@ -421,7 +425,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
421
425
|
runtime.onSchemaChange(schema);
|
|
422
426
|
});
|
|
423
427
|
const featureGatesForTelemetry = {};
|
|
424
|
-
|
|
428
|
+
// Make sure we've got all the options including internal ones
|
|
429
|
+
const internalRuntimeOptions = {
|
|
425
430
|
summaryOptions,
|
|
426
431
|
gcOptions,
|
|
427
432
|
loadSequenceNumberVerification,
|
|
@@ -433,7 +438,8 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
433
438
|
enableRuntimeIdCompressor: enableRuntimeIdCompressor,
|
|
434
439
|
enableGroupedBatching,
|
|
435
440
|
explicitSchemaControl,
|
|
436
|
-
}
|
|
441
|
+
};
|
|
442
|
+
const runtime = new containerRuntimeCtor(context, registry, metadata, electedSummarizerData, chunks ?? [], aliases ?? [], internalRuntimeOptions, containerScope, logger, existing, blobManagerSnapshot, context.storage, createIdCompressorFn, documentSchemaController, featureGatesForTelemetry, provideEntryPoint, requestHandler, undefined, // summaryConfiguration
|
|
437
443
|
recentBatchInfo);
|
|
438
444
|
runtime.blobManager.stashedBlobsUploadP.then(() => {
|
|
439
445
|
// make sure we didn't reconnect before the promise resolved
|
|
@@ -593,7 +599,6 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
593
599
|
super();
|
|
594
600
|
this.registry = registry;
|
|
595
601
|
this.metadata = metadata;
|
|
596
|
-
this.runtimeOptions = runtimeOptions;
|
|
597
602
|
this.containerScope = containerScope;
|
|
598
603
|
this.baseLogger = baseLogger;
|
|
599
604
|
this._storage = _storage;
|
|
@@ -632,6 +637,12 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
632
637
|
expiry: { policy: "absolute", durationMs: 60000 },
|
|
633
638
|
});
|
|
634
639
|
const { options, clientDetails, connected, baseSnapshot, submitFn, submitBatchFn, submitSummaryFn, submitSignalFn, disposeFn, closeFn, deltaManager, quorum, audience, loader, pendingLocalState, supportedFeatures, snapshotWithContents, } = context;
|
|
640
|
+
// Backfill in defaults for the internal runtimeOptions, since they may not be present on the provided runtimeOptions object
|
|
641
|
+
this.runtimeOptions = {
|
|
642
|
+
flushMode: defaultFlushMode,
|
|
643
|
+
enableGroupedBatching: true,
|
|
644
|
+
...runtimeOptions,
|
|
645
|
+
};
|
|
635
646
|
this.logger = createChildLogger({ logger: this.baseLogger });
|
|
636
647
|
this.mc = createChildMonitoringContext({
|
|
637
648
|
logger: this.logger,
|
|
@@ -753,14 +764,15 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
753
764
|
this.maxConsecutiveReconnects =
|
|
754
765
|
this.mc.config.getNumber(maxConsecutiveReconnectsKey) ??
|
|
755
766
|
this.defaultMaxConsecutiveReconnects;
|
|
756
|
-
if (runtimeOptions.flushMode ===
|
|
767
|
+
if (this.runtimeOptions.flushMode ===
|
|
768
|
+
FlushModeExperimental.Async &&
|
|
757
769
|
supportedFeatures?.get("referenceSequenceNumbers") !== true) {
|
|
758
770
|
// The loader does not support reference sequence numbers, falling back on FlushMode.TurnBased
|
|
759
771
|
this.mc.logger.sendErrorEvent({ eventName: "FlushModeFallback" });
|
|
760
772
|
this._flushMode = FlushMode.TurnBased;
|
|
761
773
|
}
|
|
762
774
|
else {
|
|
763
|
-
this._flushMode = runtimeOptions.flushMode;
|
|
775
|
+
this._flushMode = this.runtimeOptions.flushMode;
|
|
764
776
|
}
|
|
765
777
|
this.offlineEnabled =
|
|
766
778
|
this.mc.config.getBoolean("Fluid.Container.enableOfflineLoad") ?? false;
|
|
@@ -970,8 +982,17 @@ export class ContainerRuntime extends TypedEventEmitter {
|
|
|
970
982
|
formExponentialFn({ coefficient: 20, initialDelay: 0 })), {
|
|
971
983
|
initialDelayMs: this.initialSummarizerDelayMs,
|
|
972
984
|
});
|
|
973
|
-
|
|
974
|
-
|
|
985
|
+
// Forward events from SummaryManager
|
|
986
|
+
[
|
|
987
|
+
"summarize",
|
|
988
|
+
"summarizeAllAttemptsFailed",
|
|
989
|
+
"summarizerStop",
|
|
990
|
+
"summarizerStart",
|
|
991
|
+
"summarizerStartupFailed",
|
|
992
|
+
].forEach((eventName) => {
|
|
993
|
+
this.summaryManager?.on(eventName, (...args) => {
|
|
994
|
+
this.emit(eventName, ...args);
|
|
995
|
+
});
|
|
975
996
|
});
|
|
976
997
|
this.summaryManager.start();
|
|
977
998
|
}
|