@fluidframework/runtime-definitions 2.0.0-dev-rc.1.0.0.225277 → 2.0.0-dev-rc.1.0.0.232845
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 +44 -0
- package/README.md +0 -6
- package/api-report/runtime-definitions.api.md +6 -36
- package/dist/dataStoreContext.d.ts +14 -3
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/index.d.ts +0 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/runtime-definitions-alpha.d.ts +14 -48
- package/dist/runtime-definitions-beta.d.ts +0 -29
- package/dist/runtime-definitions-public.d.ts +0 -29
- package/dist/runtime-definitions-untrimmed.d.ts +15 -48
- package/dist/summary.d.ts +0 -13
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +64 -43
- package/src/dataStoreContext.ts +18 -3
- package/src/index.ts +0 -49
- package/src/protocol.ts +1 -0
- package/src/summary.ts +0 -13
|
@@ -2,8 +2,6 @@ import { AttachState } from '@fluidframework/container-definitions';
|
|
|
2
2
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
3
|
import { IAudience } from '@fluidframework/container-definitions';
|
|
4
4
|
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IdCompressor } from '@fluidframework/id-compressor';
|
|
6
|
-
import { IdCreationRange } from '@fluidframework/id-compressor';
|
|
7
5
|
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
8
6
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
9
7
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
@@ -12,7 +10,6 @@ import { IEvent } from '@fluidframework/core-interfaces';
|
|
|
12
10
|
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
13
11
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
14
12
|
import { IIdCompressor } from '@fluidframework/id-compressor';
|
|
15
|
-
import { IIdCompressorCore } from '@fluidframework/id-compressor';
|
|
16
13
|
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
17
14
|
import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
18
15
|
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
@@ -25,13 +22,6 @@ import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
|
25
22
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
26
23
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
27
24
|
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
28
|
-
import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
29
|
-
import { SerializedIdCompressor } from '@fluidframework/id-compressor';
|
|
30
|
-
import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
|
|
31
|
-
import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
|
|
32
|
-
import { SessionId } from '@fluidframework/id-compressor';
|
|
33
|
-
import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
34
|
-
import { StableId } from '@fluidframework/id-compressor';
|
|
35
25
|
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
36
26
|
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
37
27
|
|
|
@@ -175,7 +165,9 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
175
165
|
readonly clientDetails: IClientDetails;
|
|
176
166
|
/**
|
|
177
167
|
* Invokes the given callback and guarantees that all operations generated within the callback will be ordered
|
|
178
|
-
* sequentially.
|
|
168
|
+
* sequentially.
|
|
169
|
+
*
|
|
170
|
+
* If the callback throws an error, the container will close and the error will be logged.
|
|
179
171
|
*/
|
|
180
172
|
orderSequentially(callback: () => void): void;
|
|
181
173
|
/**
|
|
@@ -195,13 +187,18 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
195
187
|
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
196
188
|
* store being attached to storage.
|
|
197
189
|
* @param pkg - Package name of the data store factory
|
|
190
|
+
* @param groupId - group to which this data stores belongs to. This is also known at service side and can be used to
|
|
191
|
+
* fetch snapshot contents like snapshot tree, blobs using this id from the storage.
|
|
198
192
|
*/
|
|
199
|
-
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
193
|
+
createDataStore(pkg: string | string[], groupId?: string): Promise<IDataStore>;
|
|
200
194
|
/**
|
|
201
195
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
202
196
|
* data store initialization is considered complete.
|
|
197
|
+
* @param pkg - Package name of the data store factory
|
|
198
|
+
* @param groupId - group to which this data stores belongs to. This is also known at service side and can be used to
|
|
199
|
+
* fetch snapshot contents like snapshot tree, blobs using this id from the storage.
|
|
203
200
|
*/
|
|
204
|
-
createDetachedDataStore(pkg: Readonly<string[]
|
|
201
|
+
createDetachedDataStore(pkg: Readonly<string[]>, groupId?: string): IFluidDataStoreContextDetached;
|
|
205
202
|
/**
|
|
206
203
|
* Get an absolute url for a provided container-relative request.
|
|
207
204
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -257,10 +254,6 @@ export declare interface IDataStore {
|
|
|
257
254
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
258
255
|
}
|
|
259
256
|
|
|
260
|
-
export { IdCompressor }
|
|
261
|
-
|
|
262
|
-
export { IdCreationRange }
|
|
263
|
-
|
|
264
257
|
/**
|
|
265
258
|
* An envelope wraps the contents with the intended target
|
|
266
259
|
* @alpha
|
|
@@ -417,6 +410,7 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
417
410
|
readonly logger: ITelemetryBaseLogger;
|
|
418
411
|
readonly clientDetails: IClientDetails;
|
|
419
412
|
readonly idCompressor?: IIdCompressor;
|
|
413
|
+
readonly groupId?: string;
|
|
420
414
|
/**
|
|
421
415
|
* Indicates the attachment state of the data store to a host service.
|
|
422
416
|
*/
|
|
@@ -500,6 +494,9 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
500
494
|
*/
|
|
501
495
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
502
496
|
/**
|
|
497
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
498
|
+
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
499
|
+
*
|
|
503
500
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
504
501
|
* all references added in the system.
|
|
505
502
|
* @param srcHandle - The handle of the node that added the reference.
|
|
@@ -591,10 +588,6 @@ export declare interface IGarbageCollectionDetailsBase {
|
|
|
591
588
|
gcData?: IGarbageCollectionData;
|
|
592
589
|
}
|
|
593
590
|
|
|
594
|
-
export { IIdCompressor }
|
|
595
|
-
|
|
596
|
-
export { IIdCompressorCore }
|
|
597
|
-
|
|
598
591
|
/**
|
|
599
592
|
* Represents ISignalMessage with its type.
|
|
600
593
|
* @public
|
|
@@ -678,9 +671,6 @@ export declare interface ISummarizerNode {
|
|
|
678
671
|
invalidate(sequenceNumber: number): void;
|
|
679
672
|
/**
|
|
680
673
|
* Calls the internal summarize function and handles internal state tracking.
|
|
681
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
682
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
683
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
684
674
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
685
675
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
686
676
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -734,16 +724,6 @@ export declare interface ISummarizerNodeConfig {
|
|
|
734
724
|
* Defaults to true.
|
|
735
725
|
*/
|
|
736
726
|
readonly canReuseHandle?: boolean;
|
|
737
|
-
/**
|
|
738
|
-
* True to always stop execution on error during summarize, or false to
|
|
739
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
740
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
741
|
-
* Defaults to false.
|
|
742
|
-
*
|
|
743
|
-
* BUG BUG: Default to true while we investigate problem
|
|
744
|
-
* with differential summaries
|
|
745
|
-
*/
|
|
746
|
-
readonly throwOnFailure?: true;
|
|
747
727
|
}
|
|
748
728
|
|
|
749
729
|
/**
|
|
@@ -936,20 +916,6 @@ export declare interface OpAttributionKey {
|
|
|
936
916
|
seq: number;
|
|
937
917
|
}
|
|
938
918
|
|
|
939
|
-
export { OpSpaceCompressedId }
|
|
940
|
-
|
|
941
|
-
export { SerializedIdCompressor }
|
|
942
|
-
|
|
943
|
-
export { SerializedIdCompressorWithNoSession }
|
|
944
|
-
|
|
945
|
-
export { SerializedIdCompressorWithOngoingSession }
|
|
946
|
-
|
|
947
|
-
export { SessionId }
|
|
948
|
-
|
|
949
|
-
export { SessionSpaceCompressedId }
|
|
950
|
-
|
|
951
|
-
export { StableId }
|
|
952
|
-
|
|
953
919
|
/**
|
|
954
920
|
* @alpha
|
|
955
921
|
*/
|
|
@@ -2,8 +2,6 @@ import { AttachState } from '@fluidframework/container-definitions';
|
|
|
2
2
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
3
|
import { IAudience } from '@fluidframework/container-definitions';
|
|
4
4
|
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IdCompressor } from '@fluidframework/id-compressor';
|
|
6
|
-
import { IdCreationRange } from '@fluidframework/id-compressor';
|
|
7
5
|
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
8
6
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
9
7
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
@@ -12,7 +10,6 @@ import { IEvent } from '@fluidframework/core-interfaces';
|
|
|
12
10
|
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
13
11
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
14
12
|
import { IIdCompressor } from '@fluidframework/id-compressor';
|
|
15
|
-
import { IIdCompressorCore } from '@fluidframework/id-compressor';
|
|
16
13
|
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
17
14
|
import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
18
15
|
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
@@ -25,13 +22,6 @@ import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
|
25
22
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
26
23
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
27
24
|
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
28
|
-
import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
29
|
-
import { SerializedIdCompressor } from '@fluidframework/id-compressor';
|
|
30
|
-
import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
|
|
31
|
-
import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
|
|
32
|
-
import { SessionId } from '@fluidframework/id-compressor';
|
|
33
|
-
import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
34
|
-
import { StableId } from '@fluidframework/id-compressor';
|
|
35
25
|
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
36
26
|
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
37
27
|
|
|
@@ -75,10 +65,6 @@ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
|
75
65
|
|
|
76
66
|
/* Excluded from this release type: IDataStore */
|
|
77
67
|
|
|
78
|
-
/* Excluded from this release type: IdCompressor */
|
|
79
|
-
|
|
80
|
-
/* Excluded from this release type: IdCreationRange */
|
|
81
|
-
|
|
82
68
|
/* Excluded from this release type: IDocumentStorageService */
|
|
83
69
|
|
|
84
70
|
/* Excluded from this release type: IEnvelope */
|
|
@@ -137,9 +123,6 @@ export declare interface IGarbageCollectionData {
|
|
|
137
123
|
}
|
|
138
124
|
|
|
139
125
|
/* Excluded from this release type: IGarbageCollectionDetailsBase */
|
|
140
|
-
export { IIdCompressor }
|
|
141
|
-
|
|
142
|
-
/* Excluded from this release type: IIdCompressorCore */
|
|
143
126
|
|
|
144
127
|
/**
|
|
145
128
|
* Represents ISignalMessage with its type.
|
|
@@ -242,18 +225,6 @@ export declare interface ITelemetryContext {
|
|
|
242
225
|
/* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
|
|
243
226
|
|
|
244
227
|
/* Excluded from this release type: OpAttributionKey */
|
|
245
|
-
export { OpSpaceCompressedId }
|
|
246
|
-
|
|
247
|
-
/* Excluded from this release type: SerializedIdCompressor */
|
|
248
|
-
|
|
249
|
-
/* Excluded from this release type: SerializedIdCompressorWithNoSession */
|
|
250
|
-
|
|
251
|
-
/* Excluded from this release type: SerializedIdCompressorWithOngoingSession */
|
|
252
|
-
export { SessionId }
|
|
253
|
-
|
|
254
|
-
export { SessionSpaceCompressedId }
|
|
255
|
-
|
|
256
|
-
export { StableId }
|
|
257
228
|
|
|
258
229
|
/* Excluded from this release type: SummarizeInternalFn */
|
|
259
230
|
|
|
@@ -2,8 +2,6 @@ import { AttachState } from '@fluidframework/container-definitions';
|
|
|
2
2
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
3
|
import { IAudience } from '@fluidframework/container-definitions';
|
|
4
4
|
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IdCompressor } from '@fluidframework/id-compressor';
|
|
6
|
-
import { IdCreationRange } from '@fluidframework/id-compressor';
|
|
7
5
|
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
8
6
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
9
7
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
@@ -12,7 +10,6 @@ import { IEvent } from '@fluidframework/core-interfaces';
|
|
|
12
10
|
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
13
11
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
14
12
|
import { IIdCompressor } from '@fluidframework/id-compressor';
|
|
15
|
-
import { IIdCompressorCore } from '@fluidframework/id-compressor';
|
|
16
13
|
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
17
14
|
import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
18
15
|
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
@@ -25,13 +22,6 @@ import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
|
25
22
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
26
23
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
27
24
|
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
28
|
-
import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
29
|
-
import { SerializedIdCompressor } from '@fluidframework/id-compressor';
|
|
30
|
-
import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
|
|
31
|
-
import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
|
|
32
|
-
import { SessionId } from '@fluidframework/id-compressor';
|
|
33
|
-
import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
34
|
-
import { StableId } from '@fluidframework/id-compressor';
|
|
35
25
|
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
36
26
|
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
37
27
|
|
|
@@ -75,10 +65,6 @@ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
|
75
65
|
|
|
76
66
|
/* Excluded from this release type: IDataStore */
|
|
77
67
|
|
|
78
|
-
/* Excluded from this release type: IdCompressor */
|
|
79
|
-
|
|
80
|
-
/* Excluded from this release type: IdCreationRange */
|
|
81
|
-
|
|
82
68
|
/* Excluded from this release type: IDocumentStorageService */
|
|
83
69
|
|
|
84
70
|
/* Excluded from this release type: IEnvelope */
|
|
@@ -137,9 +123,6 @@ export declare interface IGarbageCollectionData {
|
|
|
137
123
|
}
|
|
138
124
|
|
|
139
125
|
/* Excluded from this release type: IGarbageCollectionDetailsBase */
|
|
140
|
-
export { IIdCompressor }
|
|
141
|
-
|
|
142
|
-
/* Excluded from this release type: IIdCompressorCore */
|
|
143
126
|
|
|
144
127
|
/**
|
|
145
128
|
* Represents ISignalMessage with its type.
|
|
@@ -242,18 +225,6 @@ export declare interface ITelemetryContext {
|
|
|
242
225
|
/* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
|
|
243
226
|
|
|
244
227
|
/* Excluded from this release type: OpAttributionKey */
|
|
245
|
-
export { OpSpaceCompressedId }
|
|
246
|
-
|
|
247
|
-
/* Excluded from this release type: SerializedIdCompressor */
|
|
248
|
-
|
|
249
|
-
/* Excluded from this release type: SerializedIdCompressorWithNoSession */
|
|
250
|
-
|
|
251
|
-
/* Excluded from this release type: SerializedIdCompressorWithOngoingSession */
|
|
252
|
-
export { SessionId }
|
|
253
|
-
|
|
254
|
-
export { SessionSpaceCompressedId }
|
|
255
|
-
|
|
256
|
-
export { StableId }
|
|
257
228
|
|
|
258
229
|
/* Excluded from this release type: SummarizeInternalFn */
|
|
259
230
|
|
|
@@ -2,8 +2,6 @@ import { AttachState } from '@fluidframework/container-definitions';
|
|
|
2
2
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
3
3
|
import { IAudience } from '@fluidframework/container-definitions';
|
|
4
4
|
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
5
|
-
import { IdCompressor } from '@fluidframework/id-compressor';
|
|
6
|
-
import { IdCreationRange } from '@fluidframework/id-compressor';
|
|
7
5
|
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
8
6
|
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
9
7
|
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
@@ -12,7 +10,6 @@ import { IEvent } from '@fluidframework/core-interfaces';
|
|
|
12
10
|
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
13
11
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
14
12
|
import { IIdCompressor } from '@fluidframework/id-compressor';
|
|
15
|
-
import { IIdCompressorCore } from '@fluidframework/id-compressor';
|
|
16
13
|
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
17
14
|
import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
18
15
|
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
@@ -25,13 +22,6 @@ import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
|
25
22
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
26
23
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
27
24
|
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
28
|
-
import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
29
|
-
import { SerializedIdCompressor } from '@fluidframework/id-compressor';
|
|
30
|
-
import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
|
|
31
|
-
import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
|
|
32
|
-
import { SessionId } from '@fluidframework/id-compressor';
|
|
33
|
-
import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
|
|
34
|
-
import { StableId } from '@fluidframework/id-compressor';
|
|
35
25
|
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
36
26
|
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
37
27
|
|
|
@@ -228,7 +218,9 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
228
218
|
readonly clientDetails: IClientDetails;
|
|
229
219
|
/**
|
|
230
220
|
* Invokes the given callback and guarantees that all operations generated within the callback will be ordered
|
|
231
|
-
* sequentially.
|
|
221
|
+
* sequentially.
|
|
222
|
+
*
|
|
223
|
+
* If the callback throws an error, the container will close and the error will be logged.
|
|
232
224
|
*/
|
|
233
225
|
orderSequentially(callback: () => void): void;
|
|
234
226
|
/**
|
|
@@ -248,13 +240,18 @@ export declare interface IContainerRuntimeBase extends IEventProvider<IContainer
|
|
|
248
240
|
* already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this
|
|
249
241
|
* store being attached to storage.
|
|
250
242
|
* @param pkg - Package name of the data store factory
|
|
243
|
+
* @param groupId - group to which this data stores belongs to. This is also known at service side and can be used to
|
|
244
|
+
* fetch snapshot contents like snapshot tree, blobs using this id from the storage.
|
|
251
245
|
*/
|
|
252
|
-
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
246
|
+
createDataStore(pkg: string | string[], groupId?: string): Promise<IDataStore>;
|
|
253
247
|
/**
|
|
254
248
|
* Creates detached data store context. Only after context.attachRuntime() is called,
|
|
255
249
|
* data store initialization is considered complete.
|
|
250
|
+
* @param pkg - Package name of the data store factory
|
|
251
|
+
* @param groupId - group to which this data stores belongs to. This is also known at service side and can be used to
|
|
252
|
+
* fetch snapshot contents like snapshot tree, blobs using this id from the storage.
|
|
256
253
|
*/
|
|
257
|
-
createDetachedDataStore(pkg: Readonly<string[]
|
|
254
|
+
createDetachedDataStore(pkg: Readonly<string[]>, groupId?: string): IFluidDataStoreContextDetached;
|
|
258
255
|
/**
|
|
259
256
|
* Get an absolute url for a provided container-relative request.
|
|
260
257
|
* Returns undefined if the container or data store isn't attached to storage.
|
|
@@ -310,10 +307,6 @@ export declare interface IDataStore {
|
|
|
310
307
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
311
308
|
}
|
|
312
309
|
|
|
313
|
-
export { IdCompressor }
|
|
314
|
-
|
|
315
|
-
export { IdCreationRange }
|
|
316
|
-
|
|
317
310
|
/**
|
|
318
311
|
* An envelope wraps the contents with the intended target
|
|
319
312
|
* @alpha
|
|
@@ -470,6 +463,7 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
470
463
|
readonly logger: ITelemetryBaseLogger;
|
|
471
464
|
readonly clientDetails: IClientDetails;
|
|
472
465
|
readonly idCompressor?: IIdCompressor;
|
|
466
|
+
readonly groupId?: string;
|
|
473
467
|
/**
|
|
474
468
|
* Indicates the attachment state of the data store to a host service.
|
|
475
469
|
*/
|
|
@@ -553,6 +547,9 @@ export declare interface IFluidDataStoreContext extends IEventProvider<IFluidDat
|
|
|
553
547
|
*/
|
|
554
548
|
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
555
549
|
/**
|
|
550
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
551
|
+
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
552
|
+
*
|
|
556
553
|
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
557
554
|
* all references added in the system.
|
|
558
555
|
* @param srcHandle - The handle of the node that added the reference.
|
|
@@ -644,10 +641,6 @@ export declare interface IGarbageCollectionDetailsBase {
|
|
|
644
641
|
gcData?: IGarbageCollectionData;
|
|
645
642
|
}
|
|
646
643
|
|
|
647
|
-
export { IIdCompressor }
|
|
648
|
-
|
|
649
|
-
export { IIdCompressorCore }
|
|
650
|
-
|
|
651
644
|
/**
|
|
652
645
|
* Represents ISignalMessage with its type.
|
|
653
646
|
* @public
|
|
@@ -683,6 +676,7 @@ export declare interface IProvideFluidDataStoreRegistry {
|
|
|
683
676
|
|
|
684
677
|
/**
|
|
685
678
|
* @internal
|
|
679
|
+
* @deprecated - This interface is now moved to `@fluidframework/container-definitions` package. Please import from that package.
|
|
686
680
|
*/
|
|
687
681
|
export declare interface ISignalEnvelope {
|
|
688
682
|
/**
|
|
@@ -750,9 +744,6 @@ export declare interface ISummarizerNode {
|
|
|
750
744
|
invalidate(sequenceNumber: number): void;
|
|
751
745
|
/**
|
|
752
746
|
* Calls the internal summarize function and handles internal state tracking.
|
|
753
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
754
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
755
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
756
747
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
757
748
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
758
749
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -806,16 +797,6 @@ export declare interface ISummarizerNodeConfig {
|
|
|
806
797
|
* Defaults to true.
|
|
807
798
|
*/
|
|
808
799
|
readonly canReuseHandle?: boolean;
|
|
809
|
-
/**
|
|
810
|
-
* True to always stop execution on error during summarize, or false to
|
|
811
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
812
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
813
|
-
* Defaults to false.
|
|
814
|
-
*
|
|
815
|
-
* BUG BUG: Default to true while we investigate problem
|
|
816
|
-
* with differential summaries
|
|
817
|
-
*/
|
|
818
|
-
readonly throwOnFailure?: true;
|
|
819
800
|
}
|
|
820
801
|
|
|
821
802
|
/**
|
|
@@ -1008,20 +989,6 @@ export declare interface OpAttributionKey {
|
|
|
1008
989
|
seq: number;
|
|
1009
990
|
}
|
|
1010
991
|
|
|
1011
|
-
export { OpSpaceCompressedId }
|
|
1012
|
-
|
|
1013
|
-
export { SerializedIdCompressor }
|
|
1014
|
-
|
|
1015
|
-
export { SerializedIdCompressorWithNoSession }
|
|
1016
|
-
|
|
1017
|
-
export { SerializedIdCompressorWithOngoingSession }
|
|
1018
|
-
|
|
1019
|
-
export { SessionId }
|
|
1020
|
-
|
|
1021
|
-
export { SessionSpaceCompressedId }
|
|
1022
|
-
|
|
1023
|
-
export { StableId }
|
|
1024
|
-
|
|
1025
992
|
/**
|
|
1026
993
|
* @alpha
|
|
1027
994
|
*/
|
package/dist/summary.d.ts
CHANGED
|
@@ -105,16 +105,6 @@ export interface ISummarizerNodeConfig {
|
|
|
105
105
|
* Defaults to true.
|
|
106
106
|
*/
|
|
107
107
|
readonly canReuseHandle?: boolean;
|
|
108
|
-
/**
|
|
109
|
-
* True to always stop execution on error during summarize, or false to
|
|
110
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
111
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
112
|
-
* Defaults to false.
|
|
113
|
-
*
|
|
114
|
-
* BUG BUG: Default to true while we investigate problem
|
|
115
|
-
* with differential summaries
|
|
116
|
-
*/
|
|
117
|
-
readonly throwOnFailure?: true;
|
|
118
108
|
}
|
|
119
109
|
/**
|
|
120
110
|
* @alpha
|
|
@@ -161,9 +151,6 @@ export interface ISummarizerNode {
|
|
|
161
151
|
invalidate(sequenceNumber: number): void;
|
|
162
152
|
/**
|
|
163
153
|
* Calls the internal summarize function and handles internal state tracking.
|
|
164
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
165
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
166
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
167
154
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
168
155
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
169
156
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
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,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EACN,WAAW,EACX,YAAY,EACZ,yBAAyB,EACzB,aAAa,EACb,KAAK,EACL,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAE5F;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM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;AAEjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAC"}
|
package/dist/summary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmJH;;GAEG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAuKD;;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\t/**\n\t * True to always stop execution on error during summarize, or false to\n\t * attempt creating a summary that is a pointer ot the last acked summary\n\t * plus outstanding ops in case of internal summarize failure.\n\t * Defaults to false.\n\t *\n\t * BUG BUG: Default to true while we investigate problem\n\t * with differential summaries\n\t */\n\treadonly throwOnFailure?: true;\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 * If unchanged and fullTree is false, it will reuse previous summary subtree.\n\t * If an error is encountered and throwOnFailure is false, it will try to make\n\t * a summary with a pointer to the previous summary + a blob of outstanding ops.\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;;;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"]}
|