@fluidframework/container-runtime 0.51.3 → 0.53.0-46105
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/dist/connectionTelemetry.d.ts +4 -0
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +6 -2
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerHandleContext.d.ts +0 -1
- package/dist/containerHandleContext.d.ts.map +1 -1
- package/dist/containerHandleContext.js +0 -1
- package/dist/containerHandleContext.js.map +1 -1
- package/dist/containerRuntime.d.ts +40 -13
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +255 -133
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +10 -7
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +16 -13
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +8 -8
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +20 -36
- package/dist/dataStores.js.map +1 -1
- package/dist/garbageCollection.d.ts +61 -14
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js +275 -20
- package/dist/garbageCollection.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.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/summarizer.d.ts +1 -3
- package/dist/summarizer.d.ts.map +1 -1
- package/dist/summarizer.js +0 -12
- package/dist/summarizer.js.map +1 -1
- package/dist/summarizerTypes.d.ts +14 -3
- package/dist/summarizerTypes.d.ts.map +1 -1
- package/dist/summarizerTypes.js +3 -0
- package/dist/summarizerTypes.js.map +1 -1
- package/dist/summaryFormat.d.ts +9 -1
- package/dist/summaryFormat.d.ts.map +1 -1
- package/dist/summaryFormat.js +2 -1
- package/dist/summaryFormat.js.map +1 -1
- package/dist/summaryGenerator.d.ts.map +1 -1
- package/dist/summaryGenerator.js +1 -3
- package/dist/summaryGenerator.js.map +1 -1
- package/dist/summaryManager.d.ts.map +1 -1
- package/dist/summaryManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +4 -0
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +5 -1
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerHandleContext.d.ts +0 -1
- package/lib/containerHandleContext.d.ts.map +1 -1
- package/lib/containerHandleContext.js +0 -1
- package/lib/containerHandleContext.js.map +1 -1
- package/lib/containerRuntime.d.ts +40 -13
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +259 -138
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +10 -7
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +16 -13
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +8 -8
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +23 -39
- package/lib/dataStores.js.map +1 -1
- package/lib/garbageCollection.d.ts +61 -14
- package/lib/garbageCollection.d.ts.map +1 -1
- package/lib/garbageCollection.js +276 -21
- package/lib/garbageCollection.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.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/summarizer.d.ts +1 -3
- package/lib/summarizer.d.ts.map +1 -1
- package/lib/summarizer.js +0 -12
- package/lib/summarizer.js.map +1 -1
- package/lib/summarizerTypes.d.ts +14 -3
- package/lib/summarizerTypes.d.ts.map +1 -1
- package/lib/summarizerTypes.js +3 -0
- package/lib/summarizerTypes.js.map +1 -1
- package/lib/summaryFormat.d.ts +9 -1
- package/lib/summaryFormat.d.ts.map +1 -1
- package/lib/summaryFormat.js +2 -1
- package/lib/summaryFormat.js.map +1 -1
- package/lib/summaryGenerator.d.ts.map +1 -1
- package/lib/summaryGenerator.js +1 -3
- package/lib/summaryGenerator.js.map +1 -1
- package/lib/summaryManager.d.ts.map +1 -1
- package/lib/summaryManager.js.map +1 -1
- package/package.json +16 -16
- package/src/connectionTelemetry.ts +6 -1
- package/src/containerHandleContext.ts +0 -1
- package/src/containerRuntime.ts +327 -160
- package/src/dataStoreContext.ts +21 -20
- package/src/dataStores.ts +32 -50
- package/src/garbageCollection.ts +390 -18
- package/src/index.ts +20 -2
- package/src/packageVersion.ts +1 -1
- package/src/summarizer.ts +0 -15
- package/src/summarizerTypes.ts +16 -4
- package/src/summaryFormat.ts +10 -1
- package/src/summaryGenerator.ts +2 -3
- package/src/summaryManager.ts +8 -3
package/src/summarizerTypes.ts
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
ITelemetryLogger,
|
|
10
10
|
} from "@fluidframework/common-definitions";
|
|
11
11
|
import {
|
|
12
|
-
IFluidRouter,
|
|
13
12
|
IFluidLoadable,
|
|
14
13
|
} from "@fluidframework/core-interfaces";
|
|
15
14
|
import { ContainerWarning, IDeltaManager } from "@fluidframework/container-definitions";
|
|
@@ -22,13 +21,25 @@ import { ISummaryStats } from "@fluidframework/runtime-definitions";
|
|
|
22
21
|
import { ISummaryAckMessage, ISummaryNackMessage, ISummaryOpMessage } from "./summaryCollection";
|
|
23
22
|
|
|
24
23
|
declare module "@fluidframework/core-interfaces" {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export interface IFluidObject {
|
|
25
|
+
/** @deprecated - use `FluidObject<ISummarizer>` instead */
|
|
26
|
+
readonly ISummarizer?: ISummarizer;
|
|
27
|
+
|
|
28
|
+
}
|
|
27
29
|
}
|
|
28
30
|
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated - This will be removed in a later release.
|
|
33
|
+
*/
|
|
29
34
|
export const ISummarizer: keyof IProvideSummarizer = "ISummarizer";
|
|
30
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated - This will be removed in a later release.
|
|
38
|
+
*/
|
|
31
39
|
export interface IProvideSummarizer {
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated - This will be removed in a later release.
|
|
42
|
+
*/
|
|
32
43
|
readonly ISummarizer: ISummarizer;
|
|
33
44
|
}
|
|
34
45
|
|
|
@@ -283,7 +294,8 @@ export interface ISummarizerEvents extends IEvent {
|
|
|
283
294
|
(event: "summarizingError", listener: (error: ISummarizingWarning) => void);
|
|
284
295
|
}
|
|
285
296
|
|
|
286
|
-
export interface ISummarizer extends
|
|
297
|
+
export interface ISummarizer extends
|
|
298
|
+
IEventProvider<ISummarizerEvents>, IFluidLoadable, Partial<IProvideSummarizer>{
|
|
287
299
|
stop(reason: SummarizerStopReason): void;
|
|
288
300
|
run(onBehalfOf: string, options?: Readonly<Partial<ISummarizerOptions>>): Promise<SummarizerStopReason>;
|
|
289
301
|
|
package/src/summaryFormat.ts
CHANGED
|
@@ -75,7 +75,7 @@ export function hasIsolatedChannels(attributes: ReadFluidDataStoreAttributes): b
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export type GCVersion = number;
|
|
78
|
-
export interface IContainerRuntimeMetadata {
|
|
78
|
+
export interface IContainerRuntimeMetadata extends ICreateContainerMetadata {
|
|
79
79
|
readonly summaryFormatVersion: 1;
|
|
80
80
|
/** The last message processed at the time of summary. Only primitive propertiy types are added to the summary. */
|
|
81
81
|
readonly message: ISummaryMetadataMessage | undefined;
|
|
@@ -83,6 +83,15 @@ export interface IContainerRuntimeMetadata {
|
|
|
83
83
|
readonly disableIsolatedChannels?: true;
|
|
84
84
|
/** 0 to disable GC, > 0 to enable GC, undefined defaults to disabled. */
|
|
85
85
|
readonly gcFeature?: GCVersion;
|
|
86
|
+
/** Counter of the last summary happened, increments every time we summarize */
|
|
87
|
+
readonly summaryCount?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface ICreateContainerMetadata {
|
|
91
|
+
/** Runtime version of the container when it was first created */
|
|
92
|
+
createContainerRuntimeVersion?: string;
|
|
93
|
+
/** Timestamp of the container when it was first created */
|
|
94
|
+
createContainerTimestamp?: number;
|
|
86
95
|
}
|
|
87
96
|
|
|
88
97
|
/** The properties of an ISequencedDocumentMessage to be stored in the metadata blob in summary. */
|
package/src/summaryGenerator.ts
CHANGED
|
@@ -346,10 +346,9 @@ export class SummaryGenerator {
|
|
|
346
346
|
}});
|
|
347
347
|
} else {
|
|
348
348
|
// Check for retryDelay in summaryNack response.
|
|
349
|
-
// back-compat: cast needed until dep on protocol-definitions version bump
|
|
350
349
|
assert(ackNackOp.type === MessageType.SummaryNack, 0x274 /* "type check" */);
|
|
351
|
-
const summaryNack = ackNackOp.contents
|
|
352
|
-
const message = summaryNack
|
|
350
|
+
const summaryNack = ackNackOp.contents;
|
|
351
|
+
const message = summaryNack?.message;
|
|
353
352
|
const retryAfterSeconds = summaryNack?.retryAfter;
|
|
354
353
|
|
|
355
354
|
const error = new LoggingError(`summaryNack: ${message}`, { retryAfterSeconds });
|
package/src/summaryManager.ts
CHANGED
|
@@ -6,14 +6,19 @@
|
|
|
6
6
|
import { IDisposable, IEvent, IEventProvider, ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
7
7
|
import { TypedEventEmitter, assert } from "@fluidframework/common-utils";
|
|
8
8
|
import { ChildLogger, PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
9
|
-
import { IFluidRouter, IRequest } from "@fluidframework/core-interfaces";
|
|
9
|
+
import { FluidObject, IFluidRouter, IRequest } from "@fluidframework/core-interfaces";
|
|
10
10
|
import { LoaderHeader } from "@fluidframework/container-definitions";
|
|
11
11
|
import { DriverHeader, DriverErrorType } from "@fluidframework/driver-definitions";
|
|
12
12
|
import { requestFluidObject } from "@fluidframework/runtime-utils";
|
|
13
13
|
import { createSummarizingWarning } from "./summarizer";
|
|
14
14
|
import { ISummarizerClientElection, summarizerClientType } from "./summarizerClientElection";
|
|
15
15
|
import { IThrottler } from "./throttler";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
ISummarizer,
|
|
18
|
+
ISummarizerOptions,
|
|
19
|
+
ISummarizingWarning,
|
|
20
|
+
SummarizerStopReason,
|
|
21
|
+
} from "./summarizerTypes";
|
|
17
22
|
import { SummaryCollection } from "./summaryCollection";
|
|
18
23
|
|
|
19
24
|
const defaultInitialDelayMs = 5000;
|
|
@@ -401,7 +406,7 @@ export const formRequestSummarizerFn = (
|
|
|
401
406
|
url: "/_summarizer",
|
|
402
407
|
};
|
|
403
408
|
|
|
404
|
-
const fluidObject = await requestFluidObject(loaderRouter, request);
|
|
409
|
+
const fluidObject = await requestFluidObject<FluidObject<ISummarizer>>(loaderRouter, request);
|
|
405
410
|
const summarizer = fluidObject.ISummarizer;
|
|
406
411
|
|
|
407
412
|
if (!summarizer) {
|