@fluidframework/container-runtime 2.0.0-internal.7.1.0 → 2.0.0-internal.7.2.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 +4 -0
- package/api-extractor.json +1 -13
- package/api-report/container-runtime.api.md +75 -10
- package/dist/blobManager.d.ts +4 -6
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +42 -56
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +71 -23
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +72 -32
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.js +2 -2
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +8 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +15 -8
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +3 -0
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js +3 -0
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/dataStores.d.ts +0 -2
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +2 -7
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerProxyBase.d.ts +1 -1
- package/dist/deltaManagerProxyBase.d.ts.map +1 -1
- package/dist/deltaManagerProxyBase.js +2 -2
- package/dist/deltaManagerProxyBase.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +6 -0
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +16 -3
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts +1 -0
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +12 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +40 -9
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +4 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryDefinitions.d.ts +1 -1
- package/dist/gc/gcSummaryDefinitions.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +2 -3
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +7 -8
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +2 -2
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -5
- package/dist/gc/index.js.map +1 -1
- package/dist/id-compressor/utilities.d.ts +3 -0
- package/dist/id-compressor/utilities.d.ts.map +1 -1
- package/dist/id-compressor/utilities.js +3 -0
- package/dist/id-compressor/utilities.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +4 -1
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js +3 -0
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +3 -0
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.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/orderedClientElection.d.ts +4 -1
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +5 -0
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +1 -0
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/summarizer.d.ts +1 -0
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +1 -0
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +94 -10
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +16 -0
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +1 -0
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +10 -1
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/lib/blobManager.d.ts +4 -6
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +44 -58
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +71 -23
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +73 -33
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.js +2 -2
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +8 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +16 -9
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreRegistry.d.ts +3 -0
- package/lib/dataStoreRegistry.d.ts.map +1 -1
- package/lib/dataStoreRegistry.js +3 -0
- package/lib/dataStoreRegistry.js.map +1 -1
- package/lib/dataStores.d.ts +0 -2
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +3 -8
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerProxyBase.d.ts +1 -1
- package/lib/deltaManagerProxyBase.d.ts.map +1 -1
- package/lib/deltaManagerProxyBase.js +2 -2
- package/lib/deltaManagerProxyBase.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +6 -0
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +16 -3
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts +1 -0
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +14 -4
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +40 -9
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +4 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryDefinitions.d.ts +1 -1
- package/lib/gc/gcSummaryDefinitions.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +2 -3
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +7 -8
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/index.d.ts +2 -2
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +2 -2
- package/lib/gc/index.js.map +1 -1
- package/lib/id-compressor/utilities.d.ts +3 -0
- package/lib/id-compressor/utilities.d.ts.map +1 -1
- package/lib/id-compressor/utilities.js +3 -0
- package/lib/id-compressor/utilities.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +4 -1
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js +3 -0
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +3 -0
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.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/orderedClientElection.d.ts +4 -1
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +5 -0
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +1 -0
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/summarizer.d.ts +1 -0
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +1 -0
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +94 -10
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +16 -0
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -0
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +10 -1
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/package.json +25 -22
- package/src/blobManager.ts +61 -74
- package/src/containerRuntime.ts +103 -50
- package/src/dataStore.ts +2 -2
- package/src/dataStoreContext.ts +16 -9
- package/src/dataStoreRegistry.ts +3 -0
- package/src/dataStores.ts +4 -16
- package/src/deltaManagerProxyBase.ts +2 -2
- package/src/gc/garbageCollection.ts +18 -3
- package/src/gc/gcConfigs.ts +22 -4
- package/src/gc/gcDefinitions.ts +41 -9
- package/src/gc/gcSummaryDefinitions.ts +1 -1
- package/src/gc/gcTelemetry.ts +8 -8
- package/src/gc/index.ts +0 -4
- package/src/id-compressor/utilities.ts +3 -0
- package/src/index.ts +13 -1
- package/src/messageTypes.ts +4 -1
- package/src/opLifecycle/definitions.ts +3 -0
- package/src/packageVersion.ts +1 -1
- package/src/summary/orderedClientElection.ts +4 -1
- package/src/summary/runWhileConnectedCoordinator.ts +5 -1
- package/src/summary/summarizer.ts +1 -0
- package/src/summary/summarizerTypes.ts +95 -11
- package/src/summary/summaryCollection.ts +18 -1
- package/src/summary/summaryFormat.ts +11 -1
- package/dist/container-runtime-alpha.d.ts +0 -1554
- package/dist/container-runtime-beta.d.ts +0 -1554
- package/dist/container-runtime-public.d.ts +0 -1554
- package/dist/container-runtime.d.ts +0 -1611
- package/src/gc/gcEarlyAdoption.md +0 -145
package/CHANGELOG.md
CHANGED
package/api-extractor.json
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "@fluidframework/build-common/api-extractor-base.json"
|
|
4
|
-
|
|
5
|
-
// TODO: Fix violations and remove these rule overrides
|
|
6
|
-
"messages": {
|
|
7
|
-
"extractorMessageReporting": {
|
|
8
|
-
"ae-missing-release-tag": {
|
|
9
|
-
"logLevel": "none"
|
|
10
|
-
},
|
|
11
|
-
"ae-forgotten-export": {
|
|
12
|
-
"logLevel": "none"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-base.json"
|
|
16
4
|
}
|
|
@@ -28,6 +28,7 @@ import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
|
28
28
|
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
29
29
|
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
30
30
|
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
31
|
+
import { IGetPendingLocalStateProps } from '@fluidframework/container-definitions';
|
|
31
32
|
import { IIdCompressor } from '@fluidframework/runtime-definitions';
|
|
32
33
|
import { IIdCompressorCore } from '@fluidframework/runtime-definitions';
|
|
33
34
|
import { ILoader } from '@fluidframework/container-definitions';
|
|
@@ -140,7 +141,9 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents
|
|
|
140
141
|
ensureNoDataModelChanges<T>(callback: () => T): T;
|
|
141
142
|
// (undocumented)
|
|
142
143
|
get flushMode(): FlushMode;
|
|
143
|
-
|
|
144
|
+
get gcThrowOnTombstoneLoad(): boolean;
|
|
145
|
+
get gcThrowOnTombstoneUsage(): boolean;
|
|
146
|
+
get gcTombstoneEnforcementAllowed(): boolean;
|
|
144
147
|
// (undocumented)
|
|
145
148
|
readonly getAbsoluteUrl: (relativeUrl: string) => Promise<string | undefined>;
|
|
146
149
|
getAliasedDataStoreEntryPoint(alias: string): Promise<IFluidHandle<FluidObject> | undefined>;
|
|
@@ -153,9 +156,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents
|
|
|
153
156
|
getGCNodePackagePath(nodePath: string): Promise<readonly string[] | undefined>;
|
|
154
157
|
getNodeType(nodePath: string): GCNodeType;
|
|
155
158
|
// (undocumented)
|
|
156
|
-
getPendingLocalState(props?:
|
|
157
|
-
notifyImminentClosure: boolean;
|
|
158
|
-
}): Promise<unknown>;
|
|
159
|
+
getPendingLocalState(props?: IGetPendingLocalStateProps): Promise<unknown>;
|
|
159
160
|
// (undocumented)
|
|
160
161
|
getQuorum(): IQuorumClients;
|
|
161
162
|
// @deprecated
|
|
@@ -211,9 +212,8 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents
|
|
|
211
212
|
submitDataStoreAliasOp(contents: any, localOpMetadata: unknown): void;
|
|
212
213
|
// (undocumented)
|
|
213
214
|
submitDataStoreOp(id: string, contents: any, localOpMetadata?: unknown): void;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
submitSignal(type: string, content: any): void;
|
|
215
|
+
submitDataStoreSignal(address: string, type: string, content: any, targetClientId?: string): void;
|
|
216
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
217
217
|
submitSummary(options: ISubmitSummaryOptions): Promise<SubmitSummaryResult>;
|
|
218
218
|
summarize(options: {
|
|
219
219
|
fullTree?: boolean;
|
|
@@ -264,6 +264,26 @@ export class FluidDataStoreRegistry implements IFluidDataStoreRegistry {
|
|
|
264
264
|
get IFluidDataStoreRegistry(): this;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
// @public (undocumented)
|
|
268
|
+
export interface GCFeatureMatrix {
|
|
269
|
+
sweepGeneration?: number;
|
|
270
|
+
tombstoneGeneration?: number;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// @public
|
|
274
|
+
export const GCNodeType: {
|
|
275
|
+
DataStore: string;
|
|
276
|
+
SubDataStore: string;
|
|
277
|
+
Blob: string;
|
|
278
|
+
Other: string;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// @public (undocumented)
|
|
282
|
+
export type GCNodeType = (typeof GCNodeType)[keyof typeof GCNodeType];
|
|
283
|
+
|
|
284
|
+
// @public (undocumented)
|
|
285
|
+
export type GCVersion = number;
|
|
286
|
+
|
|
267
287
|
// @public
|
|
268
288
|
export function generateStableId(): StableId;
|
|
269
289
|
|
|
@@ -293,6 +313,14 @@ export interface IBaseSummarizeResult {
|
|
|
293
313
|
readonly stage: "base";
|
|
294
314
|
}
|
|
295
315
|
|
|
316
|
+
// @public
|
|
317
|
+
export interface IBlobManagerLoadInfo {
|
|
318
|
+
// (undocumented)
|
|
319
|
+
ids?: string[];
|
|
320
|
+
// (undocumented)
|
|
321
|
+
redirectTable?: [string, string][];
|
|
322
|
+
}
|
|
323
|
+
|
|
296
324
|
// @public (undocumented)
|
|
297
325
|
export interface IBroadcastSummaryResult {
|
|
298
326
|
// (undocumented)
|
|
@@ -301,7 +329,7 @@ export interface IBroadcastSummaryResult {
|
|
|
301
329
|
readonly summarizeOp: ISummaryOpMessage;
|
|
302
330
|
}
|
|
303
331
|
|
|
304
|
-
// @public
|
|
332
|
+
// @public
|
|
305
333
|
export interface ICancellableSummarizerController extends ISummaryCancellationToken {
|
|
306
334
|
// (undocumented)
|
|
307
335
|
stop(reason: SummarizerStopReason): void;
|
|
@@ -360,6 +388,17 @@ export interface IContainerRuntimeMessageCompatDetails {
|
|
|
360
388
|
behavior: CompatModeBehavior;
|
|
361
389
|
}
|
|
362
390
|
|
|
391
|
+
// @public (undocumented)
|
|
392
|
+
export interface IContainerRuntimeMetadata extends ICreateContainerMetadata, IGCMetadata {
|
|
393
|
+
readonly disableIsolatedChannels?: true;
|
|
394
|
+
readonly idCompressorEnabled?: boolean;
|
|
395
|
+
readonly message: ISummaryMetadataMessage | undefined;
|
|
396
|
+
// (undocumented)
|
|
397
|
+
readonly summaryFormatVersion: 1;
|
|
398
|
+
readonly summaryNumber?: number;
|
|
399
|
+
readonly telemetryDocumentId?: string;
|
|
400
|
+
}
|
|
401
|
+
|
|
363
402
|
// @public
|
|
364
403
|
export interface IContainerRuntimeOptions {
|
|
365
404
|
readonly chunkSizeInBytes?: number;
|
|
@@ -376,12 +415,28 @@ export interface IContainerRuntimeOptions {
|
|
|
376
415
|
readonly summaryOptions?: ISummaryRuntimeOptions;
|
|
377
416
|
}
|
|
378
417
|
|
|
418
|
+
// @public (undocumented)
|
|
419
|
+
export interface ICreateContainerMetadata {
|
|
420
|
+
createContainerRuntimeVersion?: string;
|
|
421
|
+
createContainerTimestamp?: number;
|
|
422
|
+
}
|
|
423
|
+
|
|
379
424
|
// @public
|
|
380
425
|
export interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {
|
|
381
426
|
readonly afterSequenceNumber?: number;
|
|
382
427
|
readonly override?: boolean;
|
|
383
428
|
}
|
|
384
429
|
|
|
430
|
+
// @public (undocumented)
|
|
431
|
+
export interface IGCMetadata {
|
|
432
|
+
readonly gcFeature?: GCVersion;
|
|
433
|
+
readonly gcFeatureMatrix?: GCFeatureMatrix;
|
|
434
|
+
readonly sessionExpiryTimeoutMs?: number;
|
|
435
|
+
// @deprecated
|
|
436
|
+
readonly sweepEnabled?: boolean;
|
|
437
|
+
readonly sweepTimeoutMs?: number;
|
|
438
|
+
}
|
|
439
|
+
|
|
385
440
|
// @public (undocumented)
|
|
386
441
|
export interface IGCRuntimeOptions {
|
|
387
442
|
[key: string]: any;
|
|
@@ -454,6 +509,13 @@ export interface IRetriableFailureResult {
|
|
|
454
509
|
readonly retryAfterSeconds?: number;
|
|
455
510
|
}
|
|
456
511
|
|
|
512
|
+
// @public
|
|
513
|
+
export interface ISerializedElection {
|
|
514
|
+
readonly electedClientId: string | undefined;
|
|
515
|
+
readonly electedParentId: string | undefined;
|
|
516
|
+
readonly electionSequenceNumber: number;
|
|
517
|
+
}
|
|
518
|
+
|
|
457
519
|
// @public @deprecated (undocumented)
|
|
458
520
|
export function isRuntimeMessage(message: ISequencedDocumentMessage): boolean;
|
|
459
521
|
|
|
@@ -578,7 +640,7 @@ export interface ISummaryBaseConfiguration {
|
|
|
578
640
|
maxOpsSinceLastSummary: number;
|
|
579
641
|
}
|
|
580
642
|
|
|
581
|
-
// @public
|
|
643
|
+
// @public
|
|
582
644
|
export type ISummaryCancellationToken = ICancellationToken<SummarizerStopReason>;
|
|
583
645
|
|
|
584
646
|
// @public (undocumented)
|
|
@@ -616,6 +678,9 @@ export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfigurati
|
|
|
616
678
|
state: "enabled";
|
|
617
679
|
}
|
|
618
680
|
|
|
681
|
+
// @public
|
|
682
|
+
export type ISummaryMetadataMessage = Pick<ISequencedDocumentMessage, "clientId" | "clientSequenceNumber" | "minimumSequenceNumber" | "referenceSequenceNumber" | "sequenceNumber" | "timestamp" | "type">;
|
|
683
|
+
|
|
619
684
|
// @public
|
|
620
685
|
export interface ISummaryNackMessage extends ISequencedDocumentMessage {
|
|
621
686
|
// (undocumented)
|
|
@@ -785,7 +850,7 @@ export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEve
|
|
|
785
850
|
// @public
|
|
786
851
|
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";
|
|
787
852
|
|
|
788
|
-
// @
|
|
853
|
+
// @internal
|
|
789
854
|
export function TEST_requestSummarizer(loader: ILoader, url: string): Promise<ISummarizer>;
|
|
790
855
|
|
|
791
856
|
// @public
|
package/dist/blobManager.d.ts
CHANGED
|
@@ -32,12 +32,13 @@ export declare class BlobHandle implements IFluidHandle<ArrayBufferLike> {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Information from a snapshot needed to load BlobManager
|
|
35
|
+
* @public
|
|
35
36
|
*/
|
|
36
37
|
export interface IBlobManagerLoadInfo {
|
|
37
38
|
ids?: string[];
|
|
38
39
|
redirectTable?: [string, string][];
|
|
39
40
|
}
|
|
40
|
-
export type IBlobManagerRuntime = Pick<IContainerRuntime, "attachState" | "connected" | "logger" | "clientDetails"> & Pick<ContainerRuntime, "gcTombstoneEnforcementAllowed"> & TypedEventEmitter<IContainerRuntimeEvents>;
|
|
41
|
+
export type IBlobManagerRuntime = Pick<IContainerRuntime, "attachState" | "connected" | "logger" | "clientDetails"> & Pick<ContainerRuntime, "gcTombstoneEnforcementAllowed" | "gcThrowOnTombstoneLoad"> & TypedEventEmitter<IContainerRuntimeEvents>;
|
|
41
42
|
export interface IPendingBlobs {
|
|
42
43
|
[id: string]: {
|
|
43
44
|
blob: string;
|
|
@@ -79,15 +80,13 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
79
80
|
* because we know that the server will not delete the blob corresponding to that storage ID.
|
|
80
81
|
*/
|
|
81
82
|
private readonly opsInFlight;
|
|
82
|
-
private readonly retryThrottler;
|
|
83
|
-
/** If true, throw an error when a tombstone attachment blob is retrieved. */
|
|
84
|
-
private readonly throwOnTombstoneLoad;
|
|
85
83
|
/**
|
|
86
84
|
* This stores IDs of tombstoned blobs.
|
|
87
85
|
* Tombstone is a temporary feature that imitates a blob getting swept by garbage collection.
|
|
88
86
|
*/
|
|
89
87
|
private readonly tombstonedBlobs;
|
|
90
88
|
private readonly sendBlobAttachOp;
|
|
89
|
+
private stopAttaching;
|
|
91
90
|
constructor(routeContext: IFluidHandleContext, snapshot: IBlobManagerLoadInfo, getStorage: () => IDocumentStorageService,
|
|
92
91
|
/**
|
|
93
92
|
* Submit a BlobAttach op. When a blob is uploaded, there is a short grace period before which the blob is
|
|
@@ -126,7 +125,6 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
126
125
|
private deletePendingBlobMaybe;
|
|
127
126
|
private deletePendingBlob;
|
|
128
127
|
private onUploadResolve;
|
|
129
|
-
private onUploadReject;
|
|
130
128
|
/**
|
|
131
129
|
* Resubmit a BlobAttach op. Used to add storage IDs to ops that were
|
|
132
130
|
* submitted to runtime while disconnected.
|
|
@@ -189,6 +187,6 @@ export declare class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
189
187
|
*/
|
|
190
188
|
private verifyBlobValidity;
|
|
191
189
|
setRedirectTable(table: Map<string, string>): void;
|
|
192
|
-
attachAndGetPendingBlobs(): Promise<IPendingBlobs | undefined>;
|
|
190
|
+
attachAndGetPendingBlobs(stopBlobAttachingSignal?: AbortSignal): Promise<IPendingBlobs | undefined>;
|
|
193
191
|
}
|
|
194
192
|
//# sourceMappingURL=blobManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../src/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAEN,yBAAyB,EACzB,aAAa,EACb,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,EAAkC,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAe,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../src/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAEN,yBAAyB,EACzB,aAAa,EACb,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,EAAkC,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,+CAA+C,C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KG;IACI,SAAS,CAAC,MAAM,GAAE,OAAe,GAAG,sBAAsB;IAejE;;;OAGG;IACI,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI;IAIvD;;;;;OAKG;IACI,qBAAqB,CAAC,oBAAoB,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAUtE;;;;;;;;;;OAUG;IACH,OAAO,CAAC,4BAA4B;IAwCpC;;;;OAIG;IACI,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,EAAE;IAsBxD;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAiDnB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAoBrC,wBAAwB,CACpC,uBAAuB,CAAC,EAAE,WAAW,GACnC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CAqErC"}
|
package/dist/blobManager.js
CHANGED
|
@@ -11,10 +11,9 @@ const core_utils_1 = require("@fluidframework/core-utils");
|
|
|
11
11
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
12
12
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
13
13
|
const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
|
|
14
|
+
const driver_utils_1 = require("@fluidframework/driver-utils");
|
|
14
15
|
const containerRuntime_1 = require("./containerRuntime");
|
|
15
16
|
const gc_1 = require("./gc");
|
|
16
|
-
const throttler_1 = require("./throttler");
|
|
17
|
-
const summary_1 = require("./summary");
|
|
18
17
|
/**
|
|
19
18
|
* This class represents blob (long string)
|
|
20
19
|
* This object is used only when creating (writing) new blob and serialization purposes.
|
|
@@ -48,22 +47,6 @@ class BlobHandle {
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
exports.BlobHandle = BlobHandle;
|
|
51
|
-
class CancellableThrottler {
|
|
52
|
-
constructor(throttler) {
|
|
53
|
-
this.throttler = throttler;
|
|
54
|
-
this.cancelP = new core_utils_1.Deferred();
|
|
55
|
-
}
|
|
56
|
-
async getDelay() {
|
|
57
|
-
return Promise.race([
|
|
58
|
-
this.cancelP.promise,
|
|
59
|
-
new Promise((resolve) => setTimeout(resolve, this.throttler.getDelay())),
|
|
60
|
-
]);
|
|
61
|
-
}
|
|
62
|
-
cancel() {
|
|
63
|
-
this.cancelP.resolve();
|
|
64
|
-
this.cancelP = new core_utils_1.Deferred();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
50
|
class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
68
51
|
constructor(routeContext, snapshot, getStorage,
|
|
69
52
|
/**
|
|
@@ -100,24 +83,16 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
100
83
|
* because we know that the server will not delete the blob corresponding to that storage ID.
|
|
101
84
|
*/
|
|
102
85
|
this.opsInFlight = new Map();
|
|
103
|
-
this.retryThrottler = new CancellableThrottler(new throttler_1.Throttler(60 * 1000, // 60 sec delay window
|
|
104
|
-
30 * 1000, // 30 sec max delay
|
|
105
|
-
// throttling function increases exponentially (0ms, 40ms, 80ms, 160ms, etc)
|
|
106
|
-
(0, throttler_1.formExponentialFn)({ coefficient: 20, initialDelay: 0 })));
|
|
107
86
|
/**
|
|
108
87
|
* This stores IDs of tombstoned blobs.
|
|
109
88
|
* Tombstone is a temporary feature that imitates a blob getting swept by garbage collection.
|
|
110
89
|
*/
|
|
111
90
|
this.tombstonedBlobs = new Set();
|
|
91
|
+
this.stopAttaching = false;
|
|
112
92
|
this.mc = (0, telemetry_utils_1.createChildMonitoringContext)({
|
|
113
93
|
logger: this.runtime.logger,
|
|
114
94
|
namespace: "BlobManager",
|
|
115
95
|
});
|
|
116
|
-
// Read the feature flag that tells whether to throw when a tombstone blob is requested.
|
|
117
|
-
this.throwOnTombstoneLoad =
|
|
118
|
-
this.mc.config.getBoolean(gc_1.throwOnTombstoneLoadKey) === true &&
|
|
119
|
-
this.runtime.gcTombstoneEnforcementAllowed &&
|
|
120
|
-
this.runtime.clientDetails.type !== summary_1.summarizerClientType;
|
|
121
96
|
this.redirectTable = this.load(snapshot);
|
|
122
97
|
// Begin uploading stashed blobs from previous container instance
|
|
123
98
|
Object.entries(stashedBlobs).forEach(([localId, entry]) => {
|
|
@@ -205,7 +180,6 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
205
180
|
* Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
|
|
206
181
|
*/
|
|
207
182
|
async processStashedChanges() {
|
|
208
|
-
this.retryThrottler.cancel();
|
|
209
183
|
const pendingUploads = Array.from(this.pendingBlobs.values())
|
|
210
184
|
.filter((e) => e.pendingStashed === true)
|
|
211
185
|
.map(async (e) => e.uploadP);
|
|
@@ -311,7 +285,27 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
311
285
|
});
|
|
312
286
|
}
|
|
313
287
|
async uploadBlob(localId, blob) {
|
|
314
|
-
return
|
|
288
|
+
return (0, driver_utils_1.runWithRetry)(async () => {
|
|
289
|
+
try {
|
|
290
|
+
return await this.getStorage().createBlob(blob);
|
|
291
|
+
}
|
|
292
|
+
catch (error) {
|
|
293
|
+
const entry = this.pendingBlobs.get(localId);
|
|
294
|
+
(0, core_utils_1.assert)(!!entry, 0x387 /* Must have pending blob entry for blob which failed to upload */);
|
|
295
|
+
if (entry.opsent && !(0, driver_utils_1.canRetryOnError)(error)) {
|
|
296
|
+
throw (0, telemetry_utils_1.wrapError)(error, () => new telemetry_utils_1.LoggingError(`uploadBlob error`, { canRetry: true }));
|
|
297
|
+
}
|
|
298
|
+
throw error;
|
|
299
|
+
}
|
|
300
|
+
}, "createBlob", this.mc.logger, {
|
|
301
|
+
cancel: this.pendingBlobs.get(localId)?.abortSignal,
|
|
302
|
+
}).then((response) => this.onUploadResolve(localId, response), (error) => {
|
|
303
|
+
// it will only reject if we haven't sent an op
|
|
304
|
+
// and is a non-retriable error. It will only reject
|
|
305
|
+
// the promise but not throw any error outside.
|
|
306
|
+
this.pendingBlobs.get(localId)?.handleP.reject(error);
|
|
307
|
+
this.deletePendingBlob(localId);
|
|
308
|
+
});
|
|
315
309
|
}
|
|
316
310
|
/**
|
|
317
311
|
* Set up a mapping in the redirect table from fromId to toId. Also, notify the runtime that a reference is added
|
|
@@ -336,7 +330,7 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
336
330
|
onUploadResolve(localId, response) {
|
|
337
331
|
const entry = this.pendingBlobs.get(localId);
|
|
338
332
|
(0, core_utils_1.assert)(entry !== undefined, 0x6c8 /* pending blob entry not found for uploaded blob */);
|
|
339
|
-
if (entry.abortSignal?.aborted === true && !entry.opsent) {
|
|
333
|
+
if ((entry.abortSignal?.aborted === true && !entry.opsent) || this.stopAttaching) {
|
|
340
334
|
this.deletePendingBlob(localId);
|
|
341
335
|
return;
|
|
342
336
|
}
|
|
@@ -368,25 +362,6 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
368
362
|
}
|
|
369
363
|
return response;
|
|
370
364
|
}
|
|
371
|
-
async onUploadReject(localId, error) {
|
|
372
|
-
const entry = this.pendingBlobs.get(localId);
|
|
373
|
-
(0, core_utils_1.assert)(!!entry, 0x387 /* Must have pending blob entry for blob which failed to upload */);
|
|
374
|
-
if (entry.abortSignal?.aborted === true && !entry.opsent) {
|
|
375
|
-
this.deletePendingBlob(localId);
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
if (!this.runtime.connected) {
|
|
379
|
-
// we are probably not connected to storage but start another upload request in case we are
|
|
380
|
-
entry.uploadP = this.retryThrottler
|
|
381
|
-
.getDelay()
|
|
382
|
-
.then(async () => this.uploadBlob(localId, entry.blob));
|
|
383
|
-
return entry.uploadP;
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
this.deletePendingBlob(localId);
|
|
387
|
-
entry.handleP.reject(error);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
365
|
/**
|
|
391
366
|
* Resubmit a BlobAttach op. Used to add storage IDs to ops that were
|
|
392
367
|
* submitted to runtime while disconnected.
|
|
@@ -642,7 +617,7 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
642
617
|
}
|
|
643
618
|
// If the blob is deleted or throw on tombstone load is enabled, throw an error which will fail any attempt
|
|
644
619
|
// to load the blob.
|
|
645
|
-
const shouldFail = state === "deleted" || this.
|
|
620
|
+
const shouldFail = state === "deleted" || this.runtime.gcThrowOnTombstoneLoad;
|
|
646
621
|
const request = { url: blobId };
|
|
647
622
|
const error = (0, runtime_utils_1.responseToException)((0, runtime_utils_1.createResponseError)(404, "Blob was deleted", request, state === "tombstoned" ? { [containerRuntime_1.TombstoneResponseHeaderKey]: true } : undefined), request);
|
|
648
623
|
(0, gc_1.sendGCUnexpectedUsageEvent)(this.mc, {
|
|
@@ -666,7 +641,7 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
666
641
|
this.setRedirection(storageId, storageId);
|
|
667
642
|
}
|
|
668
643
|
}
|
|
669
|
-
async attachAndGetPendingBlobs() {
|
|
644
|
+
async attachAndGetPendingBlobs(stopBlobAttachingSignal) {
|
|
670
645
|
return telemetry_utils_1.PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "GetPendingBlobs" }, async () => {
|
|
671
646
|
if (this.pendingBlobs.size === 0) {
|
|
672
647
|
return;
|
|
@@ -678,11 +653,12 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
678
653
|
for (const [id, entry] of this.pendingBlobs) {
|
|
679
654
|
if (!localBlobs.has(entry)) {
|
|
680
655
|
localBlobs.add(entry);
|
|
681
|
-
if (!entry.opsent) {
|
|
682
|
-
this.sendBlobAttachOp(id, entry.storageId);
|
|
683
|
-
}
|
|
684
656
|
entry.handleP.resolve(this.getBlobHandle(id));
|
|
685
|
-
attachBlobsP.push(new Promise((resolve) => {
|
|
657
|
+
attachBlobsP.push(new Promise((resolve, reject) => {
|
|
658
|
+
stopBlobAttachingSignal?.addEventListener("abort", () => {
|
|
659
|
+
this.stopAttaching = true;
|
|
660
|
+
reject(new Error("Operation aborted"));
|
|
661
|
+
}, { once: true });
|
|
686
662
|
const onBlobAttached = (attachedEntry) => {
|
|
687
663
|
if (attachedEntry === entry) {
|
|
688
664
|
this.off("blobAttached", onBlobAttached);
|
|
@@ -698,10 +674,20 @@ class BlobManager extends client_utils_1.TypedEventEmitter {
|
|
|
698
674
|
}));
|
|
699
675
|
}
|
|
700
676
|
}
|
|
701
|
-
await Promise.
|
|
677
|
+
await Promise.allSettled(attachBlobsP).catch(() => { });
|
|
702
678
|
}
|
|
703
679
|
for (const [id, entry] of this.pendingBlobs) {
|
|
680
|
+
if (stopBlobAttachingSignal?.aborted && !entry.attached) {
|
|
681
|
+
this.mc.logger.sendTelemetryEvent({
|
|
682
|
+
eventName: "UnableToStashBlob",
|
|
683
|
+
id,
|
|
684
|
+
});
|
|
685
|
+
continue;
|
|
686
|
+
}
|
|
704
687
|
(0, core_utils_1.assert)(entry.attached === true, 0x790 /* stashed blob should be attached */);
|
|
688
|
+
if (!entry.opsent) {
|
|
689
|
+
this.sendBlobAttachOp(id, entry.storageId);
|
|
690
|
+
}
|
|
705
691
|
blobs[id] = {
|
|
706
692
|
blob: (0, client_utils_1.bufferToString)(entry.blob, "base64"),
|
|
707
693
|
storageId: entry.storageId,
|