@fluidframework/runtime-definitions 2.0.0-dev-rc.1.0.0.232845 → 2.0.0-dev-rc.2.0.0.246488
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/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +75 -0
- package/api-extractor-cjs.json +8 -0
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/runtime-definitions.api.md +102 -84
- package/dist/dataStoreContext.d.ts +124 -73
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +3 -0
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreFactory.d.ts +1 -1
- package/dist/dataStoreFactory.d.ts.map +1 -1
- package/dist/dataStoreFactory.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/{garbageCollection.d.ts → garbageCollectionDefinitions.d.ts} +8 -2
- package/dist/garbageCollectionDefinitions.d.ts.map +1 -0
- package/dist/{garbageCollection.js → garbageCollectionDefinitions.js} +9 -3
- package/dist/garbageCollectionDefinitions.js.map +1 -0
- package/dist/index.d.ts +12 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -19
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/runtime-definitions-alpha.d.ts +184 -124
- package/dist/runtime-definitions-beta.d.ts +37 -30
- package/dist/runtime-definitions-public.d.ts +37 -30
- package/dist/runtime-definitions-untrimmed.d.ts +190 -125
- package/dist/summary.d.ts +15 -7
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/attribution.d.ts +71 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +6 -0
- package/lib/attribution.js.map +1 -0
- package/lib/dataStoreContext.d.ts +464 -0
- package/lib/dataStoreContext.d.ts.map +1 -0
- package/lib/dataStoreContext.js +67 -0
- package/lib/dataStoreContext.js.map +1 -0
- package/lib/dataStoreFactory.d.ts +33 -0
- package/lib/dataStoreFactory.d.ts.map +1 -0
- package/lib/dataStoreFactory.js +9 -0
- package/lib/dataStoreFactory.js.map +1 -0
- package/lib/dataStoreRegistry.d.ts +41 -0
- package/lib/dataStoreRegistry.d.ts.map +1 -0
- package/lib/dataStoreRegistry.js +9 -0
- package/lib/dataStoreRegistry.js.map +1 -0
- package/lib/garbageCollectionDefinitions.d.ts +62 -0
- package/lib/garbageCollectionDefinitions.d.ts.map +1 -0
- package/lib/garbageCollectionDefinitions.js +35 -0
- package/lib/garbageCollectionDefinitions.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/protocol.d.ts +77 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +6 -0
- package/lib/protocol.js.map +1 -0
- package/lib/runtime-definitions-alpha.d.ts +1019 -0
- package/lib/runtime-definitions-beta.d.ts +242 -0
- package/lib/runtime-definitions-public.d.ts +242 -0
- package/lib/runtime-definitions-untrimmed.d.ts +1100 -0
- package/lib/summary.d.ts +322 -0
- package/lib/summary.d.ts.map +1 -0
- package/lib/summary.js +26 -0
- package/lib/summary.js.map +1 -0
- package/package.json +75 -31
- package/src/dataStoreContext.ts +144 -90
- package/src/dataStoreFactory.ts +1 -1
- package/src/dataStoreRegistry.ts +1 -1
- package/src/{garbageCollection.ts → garbageCollectionDefinitions.ts} +7 -1
- package/src/index.ts +26 -22
- package/src/protocol.ts +1 -1
- package/src/summary.ts +18 -7
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/dist/garbageCollection.d.ts.map +0 -1
- package/dist/garbageCollection.js.map +0 -1
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { AttachState } from '@fluidframework/container-definitions';
|
|
2
|
-
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
|
-
import { IAudience } from '@fluidframework/container-definitions';
|
|
4
|
-
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
-
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
9
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
10
|
-
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
11
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
12
|
-
import { IIdCompressor } from '@fluidframework/id-compressor';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { ITree } from '@fluidframework/protocol-definitions';
|
|
1
|
+
import type { AttachState } from '@fluidframework/container-definitions';
|
|
2
|
+
import type { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
|
+
import type { IAudience } from '@fluidframework/container-definitions';
|
|
4
|
+
import type { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
+
import type { IDeltaManager } from '@fluidframework/container-definitions';
|
|
6
|
+
import type { IDisposable } from '@fluidframework/core-interfaces';
|
|
7
|
+
import type { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
8
|
+
import type { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
9
|
+
import type { IEvent } from '@fluidframework/core-interfaces';
|
|
10
|
+
import type { IEventProvider } from '@fluidframework/core-interfaces';
|
|
11
|
+
import type { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
12
|
+
import type { IIdCompressor } from '@fluidframework/id-compressor';
|
|
13
|
+
import type { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
14
|
+
import type { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
15
|
+
import type { IRequest } from '@fluidframework/core-interfaces';
|
|
16
|
+
import type { IResponse } from '@fluidframework/core-interfaces';
|
|
17
|
+
import type { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
18
|
+
import type { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
+
import type { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
20
|
+
import type { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
21
|
+
import type { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
22
|
+
import type { ITree } from '@fluidframework/protocol-definitions';
|
|
24
23
|
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import {
|
|
24
|
+
import type { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* Encapsulates the return codes of the aliasing API.
|
|
@@ -135,6 +134,9 @@ export declare type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluid
|
|
|
135
134
|
export declare enum FlushMode {
|
|
136
135
|
/**
|
|
137
136
|
* In Immediate flush mode the runtime will immediately send all operations to the driver layer.
|
|
137
|
+
*
|
|
138
|
+
* @deprecated This option will be removed in the next major version and should not be used. Use {@link FlushMode.TurnBased} instead, which is the default.
|
|
139
|
+
* See https://github.com/microsoft/FluidFramework/tree/main/packages/runtime/container-runtime/src/opLifecycle#how-batching-works
|
|
138
140
|
*/
|
|
139
141
|
Immediate = 0,
|
|
140
142
|
/**
|
|
@@ -161,12 +163,19 @@ export declare enum FlushModeExperimental {
|
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
/**
|
|
164
|
-
*
|
|
166
|
+
* The prefix for GC blobs in the GC tree in summary.
|
|
165
167
|
*
|
|
166
168
|
* @internal
|
|
167
169
|
*/
|
|
168
170
|
export declare const gcBlobPrefix = "__gc";
|
|
169
171
|
|
|
172
|
+
/**
|
|
173
|
+
* The key for the GC Data blob in attach summaries.
|
|
174
|
+
*
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
export declare const gcDataBlobKey = ".gcdata";
|
|
178
|
+
|
|
170
179
|
/**
|
|
171
180
|
* The key for deleted nodes blob in the GC tree in summary.
|
|
172
181
|
*
|
|
@@ -216,6 +225,7 @@ export declare interface IAttachMessage {
|
|
|
216
225
|
export declare interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
217
226
|
readonly logger: ITelemetryBaseLogger;
|
|
218
227
|
readonly clientDetails: IClientDetails;
|
|
228
|
+
readonly disposed: boolean;
|
|
219
229
|
/**
|
|
220
230
|
* Invokes the given callback and guarantees that all operations generated within the callback will be ordered
|
|
221
231
|
* sequentially.
|
|
@@ -227,12 +237,13 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
227
237
|
* Submits a container runtime level signal to be sent to other clients.
|
|
228
238
|
* @param type - Type of the signal.
|
|
229
239
|
* @param content - Content of the signal.
|
|
240
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
230
241
|
*/
|
|
231
|
-
submitSignal(type: string, content: any): void;
|
|
242
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
232
243
|
/**
|
|
233
244
|
* @deprecated 0.16 Issue #1537, #3631
|
|
234
245
|
*/
|
|
235
|
-
_createDataStoreWithProps(pkg: string | string[]
|
|
246
|
+
_createDataStoreWithProps(pkg: Readonly<string | string[]>, props?: any, id?: string): Promise<IDataStore>;
|
|
236
247
|
/**
|
|
237
248
|
* Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves
|
|
238
249
|
* as the data store's router. The data store is not bound to a container, and in such state is not persisted to
|
|
@@ -240,18 +251,20 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
240
251
|
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
241
252
|
* store being attached to storage.
|
|
242
253
|
* @param pkg - Package name of the data store factory
|
|
243
|
-
* @param
|
|
244
|
-
*
|
|
254
|
+
* @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
|
|
255
|
+
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
256
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
245
257
|
*/
|
|
246
|
-
createDataStore(pkg: string | string[]
|
|
258
|
+
createDataStore(pkg: Readonly<string | string[]>, loadingGroupId?: string): Promise<IDataStore>;
|
|
247
259
|
/**
|
|
248
260
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
249
261
|
* data store initialization is considered complete.
|
|
250
262
|
* @param pkg - Package name of the data store factory
|
|
251
|
-
* @param
|
|
252
|
-
*
|
|
263
|
+
* @param loadingGroupId - This represents the group of the datastore within a container or its snapshot.
|
|
264
|
+
* When not specified the datastore will belong to a `default` group. Read more about it in this
|
|
265
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}.
|
|
253
266
|
*/
|
|
254
|
-
createDetachedDataStore(pkg: Readonly<string[]>,
|
|
267
|
+
createDetachedDataStore(pkg: Readonly<string[]>, loadingGroupId?: string): IFluidDataStoreContextDetached;
|
|
255
268
|
/**
|
|
256
269
|
* Get an absolute url for a provided container-relative request.
|
|
257
270
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -267,6 +280,28 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
267
280
|
* Returns the current audience.
|
|
268
281
|
*/
|
|
269
282
|
getAudience(): IAudience;
|
|
283
|
+
/**
|
|
284
|
+
* Generates a new ID that is guaranteed to be unique across all sessions for this container.
|
|
285
|
+
* It could be in compact form (non-negative integer, oppotunistic), but it could also be UUID string.
|
|
286
|
+
* UUIDs generated will have low entropy in groups and will compress well.
|
|
287
|
+
* It can be leveraged anywhere in container where container unique IDs are required, i.e. any place
|
|
288
|
+
* that uses uuid() and stores result in container is likely candidate to start leveraging this API.
|
|
289
|
+
* If you always want to convert to string, instead of doing String(generateDocumentUniqueId()), consider
|
|
290
|
+
* doing encodeCompactIdToString(generateDocumentUniqueId()).
|
|
291
|
+
*
|
|
292
|
+
* For more details, please see IIdCompressor.generateDocumentUniqueId()
|
|
293
|
+
*/
|
|
294
|
+
generateDocumentUniqueId(): number | string;
|
|
295
|
+
/**
|
|
296
|
+
* Api to fetch the snapshot from the service for a loadingGroupIds.
|
|
297
|
+
* @param loadingGroupIds - LoadingGroupId for which the snapshot is asked for.
|
|
298
|
+
* @param pathParts - Parts of the path, which we want to extract from the snapshot tree.
|
|
299
|
+
* @returns - snapshotTree and the sequence number of the snapshot.
|
|
300
|
+
*/
|
|
301
|
+
getSnapshotForLoadingGroupId(loadingGroupIds: string[], pathParts: string[]): Promise<{
|
|
302
|
+
snapshotTree: ISnapshotTree;
|
|
303
|
+
sequenceNumber: number;
|
|
304
|
+
}>;
|
|
270
305
|
}
|
|
271
306
|
|
|
272
307
|
/**
|
|
@@ -281,6 +316,7 @@ export declare interface IContainerRuntimeBaseEvents extends IEvent {
|
|
|
281
316
|
(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
|
|
282
317
|
(event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
|
|
283
318
|
(event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
|
|
319
|
+
(event: "dispose", listener: () => void): any;
|
|
284
320
|
}
|
|
285
321
|
|
|
286
322
|
/**
|
|
@@ -357,34 +393,27 @@ export declare interface IExperimentalIncrementalSummaryContext {
|
|
|
357
393
|
* @alpha
|
|
358
394
|
*/
|
|
359
395
|
export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
360
|
-
readonly id: string;
|
|
361
|
-
/**
|
|
362
|
-
* Indicates the attachment state of the channel to a host service.
|
|
363
|
-
*/
|
|
364
|
-
readonly attachState: AttachState;
|
|
365
|
-
readonly visibilityState: VisibilityState;
|
|
366
|
-
/**
|
|
367
|
-
* Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
|
|
368
|
-
* @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.
|
|
369
|
-
*/
|
|
370
|
-
attachGraph(): void;
|
|
371
396
|
/**
|
|
372
397
|
* Makes the data store channel visible in the container. Also, runs through its graph and attaches all
|
|
373
398
|
* bound handles that represent its dependencies in the container's graph.
|
|
374
399
|
*/
|
|
375
400
|
makeVisibleAndAttachGraph(): void;
|
|
376
401
|
/**
|
|
377
|
-
*
|
|
402
|
+
* Synchronously retrieves the summary used as part of the initial summary message
|
|
378
403
|
*/
|
|
379
404
|
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
405
|
+
/**
|
|
406
|
+
* Synchronously retrieves GC Data (representing the outbound routes present) for the initial state of the DataStore
|
|
407
|
+
*/
|
|
408
|
+
getAttachGCData?(telemetryContext?: ITelemetryContext): IGarbageCollectionData;
|
|
380
409
|
/**
|
|
381
410
|
* Processes the op.
|
|
382
411
|
*/
|
|
383
|
-
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
412
|
+
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown, addedOutboundReference?: (fromNodePath: string, toNodePath: string) => void): void;
|
|
384
413
|
/**
|
|
385
414
|
* Processes the signal.
|
|
386
415
|
*/
|
|
387
|
-
processSignal(message:
|
|
416
|
+
processSignal(message: IInboundSignalMessage, local: boolean): void;
|
|
388
417
|
/**
|
|
389
418
|
* Generates a summary for the channel.
|
|
390
419
|
* Introduced with summarizerNode - will be required in a future release.
|
|
@@ -432,6 +461,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
432
461
|
*/
|
|
433
462
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
434
463
|
request(request: IRequest): Promise<IResponse>;
|
|
464
|
+
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
|
|
435
465
|
}
|
|
436
466
|
|
|
437
467
|
/**
|
|
@@ -439,7 +469,7 @@ export declare interface IFluidDataStoreChannel extends IDisposable {
|
|
|
439
469
|
* get information and call functionality to the container.
|
|
440
470
|
* @alpha
|
|
441
471
|
*/
|
|
442
|
-
export declare interface IFluidDataStoreContext extends
|
|
472
|
+
export declare interface IFluidDataStoreContext extends IFluidParentContext {
|
|
443
473
|
readonly id: string;
|
|
444
474
|
/**
|
|
445
475
|
* A data store created by a client, is a local data store for that client. Also, when a detached container loads
|
|
@@ -454,29 +484,110 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
454
484
|
* The package path of the data store as per the package factory.
|
|
455
485
|
*/
|
|
456
486
|
readonly packagePath: readonly string[];
|
|
457
|
-
readonly
|
|
487
|
+
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
488
|
+
/**
|
|
489
|
+
* @deprecated 0.16 Issue #1635, #3631
|
|
490
|
+
*/
|
|
491
|
+
readonly createProps?: any;
|
|
492
|
+
/**
|
|
493
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
494
|
+
*
|
|
495
|
+
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
496
|
+
* and its children with the GC details from the previous summary.
|
|
497
|
+
*/
|
|
498
|
+
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
499
|
+
/**
|
|
500
|
+
* (Same as @see addedGCOutboundReference, but with string paths instead of handles)
|
|
501
|
+
*
|
|
502
|
+
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
503
|
+
* all references added in the system.
|
|
504
|
+
*
|
|
505
|
+
* @param fromPath - The absolute path of the node that added the reference.
|
|
506
|
+
* @param toPath - The absolute path of the outbound node that is referenced.
|
|
507
|
+
*/
|
|
508
|
+
addedGCOutboundRoute?(fromPath: string, toPath: string): void;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* @alpha
|
|
513
|
+
*/
|
|
514
|
+
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
515
|
+
/**
|
|
516
|
+
* Binds a runtime to the context.
|
|
517
|
+
*/
|
|
518
|
+
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<IDataStore>;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* @alpha
|
|
523
|
+
*/
|
|
524
|
+
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
528
|
+
* and usually provided to consumers using this mapping through a data store registry.
|
|
529
|
+
* @alpha
|
|
530
|
+
*/
|
|
531
|
+
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
532
|
+
/**
|
|
533
|
+
* String that uniquely identifies the type of data store created by this factory.
|
|
534
|
+
*/
|
|
535
|
+
type: string;
|
|
536
|
+
/**
|
|
537
|
+
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
538
|
+
* @param context - Context for the data store.
|
|
539
|
+
* @param existing - If instantiating from an existing file.
|
|
540
|
+
*/
|
|
541
|
+
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* @alpha
|
|
546
|
+
*/
|
|
547
|
+
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* An association of identifiers to data store registry entries, where the
|
|
551
|
+
* entries can be used to create data stores.
|
|
552
|
+
* @alpha
|
|
553
|
+
*/
|
|
554
|
+
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
555
|
+
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Represents the context for the data store like objects. It is used by the data store runtime to
|
|
560
|
+
* get information and call functionality to its parent.
|
|
561
|
+
*
|
|
562
|
+
* This layout is temporary, as {@link IFluidParentContext} and {@link IFluidDataStoreContext} will converge.
|
|
563
|
+
*
|
|
564
|
+
* @alpha
|
|
565
|
+
*/
|
|
566
|
+
export declare interface IFluidParentContext extends IProvideFluidHandleContext, Partial<IProvideFluidDataStoreRegistry> {
|
|
567
|
+
readonly options: Record<string | number, any>;
|
|
458
568
|
readonly clientId: string | undefined;
|
|
459
569
|
readonly connected: boolean;
|
|
460
570
|
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
461
571
|
readonly storage: IDocumentStorageService;
|
|
462
|
-
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
463
572
|
readonly logger: ITelemetryBaseLogger;
|
|
464
573
|
readonly clientDetails: IClientDetails;
|
|
465
574
|
readonly idCompressor?: IIdCompressor;
|
|
466
|
-
|
|
575
|
+
/**
|
|
576
|
+
* Represents the loading group to which the data store belongs to. Please refer to this readme for more context.
|
|
577
|
+
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}
|
|
578
|
+
*/
|
|
579
|
+
readonly loadingGroupId?: string;
|
|
467
580
|
/**
|
|
468
581
|
* Indicates the attachment state of the data store to a host service.
|
|
469
582
|
*/
|
|
470
583
|
readonly attachState: AttachState;
|
|
471
584
|
readonly containerRuntime: IContainerRuntimeBase;
|
|
472
|
-
/**
|
|
473
|
-
* @deprecated 0.16 Issue #1635, #3631
|
|
474
|
-
*/
|
|
475
|
-
readonly createProps?: any;
|
|
476
585
|
/**
|
|
477
586
|
* Ambient services provided with the context
|
|
478
587
|
*/
|
|
479
588
|
readonly scope: FluidObject;
|
|
589
|
+
readonly gcThrowOnTombstoneUsage: boolean;
|
|
590
|
+
readonly gcTombstoneEnforcementAllowed: boolean;
|
|
480
591
|
/**
|
|
481
592
|
* Returns the current quorum.
|
|
482
593
|
*/
|
|
@@ -515,11 +626,6 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
515
626
|
* when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
|
|
516
627
|
*/
|
|
517
628
|
makeLocallyVisible(): void;
|
|
518
|
-
/**
|
|
519
|
-
* Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
520
|
-
* @param address - The address of the channel that is dirty.
|
|
521
|
-
*/
|
|
522
|
-
setChannelDirty(address: string): void;
|
|
523
629
|
/**
|
|
524
630
|
* Get an absolute url to the container based on the provided relativeUrl.
|
|
525
631
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -538,78 +644,29 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
538
644
|
* If it is local, it will throw unsupported errors on calls to summarize.
|
|
539
645
|
*/
|
|
540
646
|
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
|
|
647
|
+
deleteChildSummarizerNode(id: string): void;
|
|
541
648
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
542
|
-
/**
|
|
543
|
-
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
544
|
-
*
|
|
545
|
-
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
546
|
-
* and its children with the GC details from the previous summary.
|
|
547
|
-
*/
|
|
548
|
-
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
549
649
|
/**
|
|
550
650
|
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
551
651
|
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
552
652
|
*
|
|
653
|
+
* Similar capability is exposed with from/to string paths instead of handles via @see addedGCOutboundRoute
|
|
654
|
+
*
|
|
553
655
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
554
656
|
* all references added in the system.
|
|
555
657
|
* @param srcHandle - The handle of the node that added the reference.
|
|
556
658
|
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
557
659
|
*/
|
|
558
|
-
addedGCOutboundReference?(srcHandle:
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
*/
|
|
564
|
-
export declare interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
660
|
+
addedGCOutboundReference?(srcHandle: {
|
|
661
|
+
absolutePath: string;
|
|
662
|
+
}, outboundHandle: {
|
|
663
|
+
absolutePath: string;
|
|
664
|
+
}): void;
|
|
565
665
|
/**
|
|
566
|
-
*
|
|
567
|
-
|
|
568
|
-
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* @alpha
|
|
573
|
-
*/
|
|
574
|
-
export declare interface IFluidDataStoreContextEvents extends IEvent {
|
|
575
|
-
(event: "attaching" | "attached", listener: () => void): any;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* @alpha
|
|
580
|
-
*/
|
|
581
|
-
export declare const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
* IFluidDataStoreFactory create data stores. It is associated with an identifier (its `type` member)
|
|
585
|
-
* and usually provided to consumers using this mapping through a data store registry.
|
|
586
|
-
* @alpha
|
|
587
|
-
*/
|
|
588
|
-
export declare interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
589
|
-
/**
|
|
590
|
-
* String that uniquely identifies the type of data store created by this factory.
|
|
591
|
-
*/
|
|
592
|
-
type: string;
|
|
593
|
-
/**
|
|
594
|
-
* Generates runtime for the data store from the data store context. Once created should be bound to the context.
|
|
595
|
-
* @param context - Context for the data store.
|
|
596
|
-
* @param existing - If instantiating from an existing file.
|
|
666
|
+
* Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
|
|
667
|
+
* @param address - The address of the channel that is dirty.
|
|
597
668
|
*/
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* @alpha
|
|
603
|
-
*/
|
|
604
|
-
export declare const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* An association of identifiers to data store registry entries, where the
|
|
608
|
-
* entries can be used to create data stores.
|
|
609
|
-
* @alpha
|
|
610
|
-
*/
|
|
611
|
-
export declare interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
612
|
-
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
669
|
+
setChannelDirty(address: string): void;
|
|
613
670
|
}
|
|
614
671
|
|
|
615
672
|
/**
|
|
@@ -784,7 +841,9 @@ export declare interface ISummarizerNode {
|
|
|
784
841
|
*/
|
|
785
842
|
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
786
843
|
getChild(id: string): ISummarizerNode | undefined;
|
|
787
|
-
/**
|
|
844
|
+
/**
|
|
845
|
+
* True if a summary is currently in progress
|
|
846
|
+
*/
|
|
788
847
|
isSummaryInProgress?(): boolean;
|
|
789
848
|
}
|
|
790
849
|
|
|
@@ -927,24 +986,30 @@ export declare interface ITelemetryContext {
|
|
|
927
986
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
928
987
|
* @param value - value to attribute to this summary telemetry data
|
|
929
988
|
*/
|
|
930
|
-
set(prefix: string, property: string, value:
|
|
989
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
931
990
|
/**
|
|
932
991
|
* Sets multiple values for telemetry data being tracked.
|
|
933
992
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
934
993
|
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
935
994
|
* @param values - A set of values to attribute to this summary telemetry data.
|
|
936
995
|
*/
|
|
937
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
996
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
938
997
|
/**
|
|
939
998
|
* Get the telemetry data being tracked
|
|
999
|
+
*
|
|
1000
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
1001
|
+
*
|
|
940
1002
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
941
1003
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
942
1004
|
* @returns undefined if item not found
|
|
943
1005
|
*/
|
|
944
|
-
get(prefix: string, property: string):
|
|
1006
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
945
1007
|
/**
|
|
946
1008
|
* Returns a serialized version of all the telemetry data.
|
|
947
1009
|
* Should be used when logging in telemetry events.
|
|
1010
|
+
*
|
|
1011
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
1012
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
948
1013
|
*/
|
|
949
1014
|
serialize(): string;
|
|
950
1015
|
}
|
package/dist/summary.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
|
|
7
|
-
import { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./
|
|
5
|
+
import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
|
|
6
|
+
import type { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
|
|
7
|
+
import type { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollectionDefinitions.js";
|
|
8
8
|
/**
|
|
9
9
|
* Contains the aggregation data from a Tree/Subtree.
|
|
10
10
|
* @public
|
|
@@ -191,7 +191,9 @@ export interface ISummarizerNode {
|
|
|
191
191
|
*/
|
|
192
192
|
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
193
193
|
getChild(id: string): ISummarizerNode | undefined;
|
|
194
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* True if a summary is currently in progress
|
|
196
|
+
*/
|
|
195
197
|
isSummaryInProgress?(): boolean;
|
|
196
198
|
}
|
|
197
199
|
/**
|
|
@@ -282,24 +284,30 @@ export interface ITelemetryContext {
|
|
|
282
284
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
283
285
|
* @param value - value to attribute to this summary telemetry data
|
|
284
286
|
*/
|
|
285
|
-
set(prefix: string, property: string, value:
|
|
287
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
286
288
|
/**
|
|
287
289
|
* Sets multiple values for telemetry data being tracked.
|
|
288
290
|
* @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
|
|
289
291
|
* @param property - property name of the telemetry data being tracked (ex: "Options")
|
|
290
292
|
* @param values - A set of values to attribute to this summary telemetry data.
|
|
291
293
|
*/
|
|
292
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
294
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
293
295
|
/**
|
|
294
296
|
* Get the telemetry data being tracked
|
|
297
|
+
*
|
|
298
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
299
|
+
*
|
|
295
300
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
296
301
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
297
302
|
* @returns undefined if item not found
|
|
298
303
|
*/
|
|
299
|
-
get(prefix: string, property: string):
|
|
304
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
300
305
|
/**
|
|
301
306
|
* Returns a serialized version of all the telemetry data.
|
|
302
307
|
* Should be used when logging in telemetry events.
|
|
308
|
+
*
|
|
309
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
310
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
303
311
|
*/
|
|
304
312
|
serialize(): string;
|
|
305
313
|
}
|
package/dist/summary.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"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"}
|
package/dist/summary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyIH;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAoKD;;GAEG;AACU,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA2C5C;;GAEG;AACU,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACU,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport {\n\tSummaryTree,\n\tISummaryTree,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tITree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @public\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @public\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @alpha\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @alpha\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @public\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\tsummarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\tlatestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\tsummaryPath: string;\n}\n\n/**\n * @alpha\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @alpha\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @alpha\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @alpha\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @alpha\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @alpha\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/** True if a summary is currently in progress */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @alpha\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @public\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryEventPropertyType>,\n\t): void;\n\n\t/**\n\t * Get the telemetry data being tracked\n\t * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @returns undefined if item not found\n\t */\n\tget(prefix: string, property: string): TelemetryEventPropertyType;\n\n\t/**\n\t * Returns a serialized version of all the telemetry data.\n\t * Should be used when logging in telemetry events.\n\t */\n\tserialize(): string;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA4IH;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAsKD;;GAEG;AACU,QAAA,gBAAgB,GAAG,WAAW,CAAC;AAiD5C;;GAEG;AACU,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACU,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tSummaryTree,\n\tISummaryTree,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tITree,\n} from \"@fluidframework/protocol-definitions\";\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @public\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @public\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @alpha\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @alpha\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @public\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\tsummarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\tlatestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\tsummaryPath: string;\n}\n\n/**\n * @alpha\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @alpha\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @alpha\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @alpha\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @alpha\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @alpha\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @alpha\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @public\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n\n\t/**\n\t * Get the telemetry data being tracked\n\t *\n\t * @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.\n\t *\n\t * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @returns undefined if item not found\n\t */\n\tget(prefix: string, property: string): TelemetryBaseEventPropertyType;\n\n\t/**\n\t * Returns a serialized version of all the telemetry data.\n\t * Should be used when logging in telemetry events.\n\t *\n\t * @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function\n\t * but this functionality should not be used by other code being given an ITelemetryContext.\n\t */\n\tserialize(): string;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
|