@fluidframework/runtime-definitions 1.2.0 → 2.0.0-internal.1.0.0.81589

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.
@@ -61,10 +61,9 @@ export interface IContainerRuntimeBaseEvents extends IEvent {
61
61
  * 'Conflict' - there is already a datastore bound to the provided alias. To acquire a handle to it,
62
62
  * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded
63
63
  * and will be garbage collected. The current datastore cannot be aliased to a different value.
64
- * 'Aliasing' (deprecated) - this value is never returned.
65
64
  * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.
66
65
  */
67
- export declare type AliasResult = "Success" | "Conflict" | "Aliasing" | "AlreadyAliased";
66
+ export declare type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
68
67
  /**
69
68
  * A fluid router with the capability of being assigned an alias
70
69
  */
@@ -119,8 +118,8 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
119
118
  */
120
119
  createDataStore(pkg: string | string[]): Promise<IDataStore>;
121
120
  /**
122
- * Creates detached data store context. only after context.attachRuntime() is called,
123
- * data store initialization is considered compete.
121
+ * Creates detached data store context. Only after context.attachRuntime() is called,
122
+ * data store initialization is considered complete.
124
123
  */
125
124
  createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
126
125
  /**
@@ -152,12 +151,6 @@ export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable {
152
151
  */
153
152
  readonly attachState: AttachState;
154
153
  readonly visibilityState?: VisibilityState;
155
- /**
156
- * @deprecated - This is an internal method that should not be exposed.
157
- * Called to bind the runtime to the container.
158
- * If the container is not attached to storage, then this would also be unknown to other clients.
159
- */
160
- bindToContext(): void;
161
154
  /**
162
155
  * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.
163
156
  * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
@@ -167,7 +160,7 @@ export interface IFluidDataStoreChannel extends IFluidRouter, IDisposable {
167
160
  * Makes the data store channel visible in the container. Also, runs through its graph and attaches all
168
161
  * bound handles that represent its dependencies in the container's graph.
169
162
  */
170
- makeVisibleAndAttachGraph?(): void;
163
+ makeVisibleAndAttachGraph(): void;
171
164
  /**
172
165
  * Retrieves the summary used as part of the initial summary message
173
166
  */
@@ -291,16 +284,11 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
291
284
  * @param content - Content of the signal.
292
285
  */
293
286
  submitSignal(type: string, content: any): void;
294
- /**
295
- * @deprecated - To be removed in favor of makeVisible.
296
- * Register the runtime to the container
297
- */
298
- bindToContext(): void;
299
287
  /**
300
288
  * Called to make the data store locally visible in the container. This happens automatically for root data stores
301
289
  * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
302
290
  */
303
- makeLocallyVisible?(): void;
291
+ makeLocallyVisible(): void;
304
292
  /**
305
293
  * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
306
294
  * @param address - The address of the channel that is dirty.
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EACH,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,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AE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEjE,8BAA8B;IAC1B,2CAA2C;IAC3C,EAAE,EAAE,MAAM;IACV;;;;;OAKG;IACH,WAAW,EAAE,8BAA8B,GAC5C,2BAA2B,CAAC;IAE/B,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC;IAE1E;;OAEG;IACH,0BAA0B,IAAI,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAExE;;;OAGG;IACH,gBAAgB,CAAC,IAAI,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAE5D;;;;;OAKG;IACH,wBAAwB,CAAC,CAAC,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,GAAG,IAAI,CAAC;CAC1F;AAED,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;IAC1E;;OAEG;IACH,aAAa,CACT,OAAO,EAAE,6BAA6B,EACtC,gBAAgB,EAAE,sBAAsB,GACzC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,mGAAmG;IACnG,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;OAMG;IACH,eAAe,EAAE,iBAAiB;CACrC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n ITelemetryContext,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\" | \"op\", listener: (op: ISequencedDocumentMessage) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire a handle to it,\n * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'Aliasing' (deprecated) - this value is never returned.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\n export type AliasResult = \"Success\" | \"Conflict\" | \"Aliasing\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\n export interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias and will not be garbage collected.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Sets the flush mode for operations on the document.\n * @deprecated - Will be removed in 0.60. See #9480.\n */\n setFlushMode(mode: FlushMode): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n isRoot?: boolean,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. only after context.attachRuntime() is called,\n * data store initialization is considered compete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * @deprecated - This is an internal method that should not be exposed.\n * Called to bind the runtime to the container.\n * If the container is not attached to storage, then this would also be unknown to other clients.\n */\n bindToContext(): void;\n\n /**\n * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph?(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree?: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If any node becomes unreferenced\n * as part of this GC run, this should be used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n\n /**\n * Revert a local message.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n rollback?(type: string, content: any, localOpMetadata: unknown): void;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn: () => Promise<IGarbageCollectionSummaryDetails>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated - To be removed in favor of makeVisible.\n * Register the runtime to the container\n */\n bindToContext(): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible?(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * @deprecated - Renamed to getBaseGCDetails.\n */\n getInitialGCSummaryDetails(): Promise<IGarbageCollectionSummaryDetails>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails?(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyCH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACjB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACb,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,mGAAmG;IACnG,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;OAMG;IACH,eAAe,EAAE,iBAAiB;CACrC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger, IDisposable, IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport {\n IFluidRouter,\n IProvideFluidHandleContext,\n IFluidHandle,\n IRequest,\n IResponse,\n FluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport {\n IAudience,\n IDeltaManager,\n AttachState,\n ILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n IClientDetails,\n IDocumentMessage,\n IQuorumClients,\n ISequencedDocumentMessage,\n ISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n CreateChildSummarizerNodeParam,\n ISummarizerNodeWithGC,\n ISummaryTreeWithStats,\n ITelemetryContext,\n SummarizeInternalFn,\n} from \"./summary\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n /**\n * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n */\n Immediate,\n\n /**\n * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n */\n TurnBased,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n /** Indicates that the object is not visible. This is the state when an object is first created. */\n NotVisible: \"NotVisible\",\n\n /**\n * Indicates that the object is visible locally within the container. This is the state when an object is attached\n * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n * visible to locally visible.\n */\n LocallyVisible: \"LocallyVisible\",\n\n /**\n * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n * not visible to globally visible.\n * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n * visible.\n */\n GloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent{\n (event: \"batchBegin\" | \"op\", listener: (op: ISequencedDocumentMessage) => void);\n (event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n (event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire a handle to it,\n * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\n export type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * A fluid router with the capability of being assigned an alias\n */\n export interface IDataStore extends IFluidRouter {\n /**\n * Attempt to assign an alias to the datastore.\n * If the operation succeeds, the datastore can be referenced\n * by the supplied alias and will not be garbage collected.\n *\n * @param alias - Given alias for this datastore.\n */\n trySetAlias(alias: string): Promise<AliasResult>;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends\n IEventProvider<IContainerRuntimeBaseEvents>,\n IProvideFluidHandleContext {\n\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n\n /**\n * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n * sequentially. Total size of all messages must be less than maxOpSize.\n */\n orderSequentially(callback: () => void): void;\n\n /**\n * Sets the flush mode for operations on the document.\n * @deprecated - Will be removed in 0.60. See #9480.\n */\n setFlushMode(mode: FlushMode): void;\n\n /**\n * Executes a request against the container runtime\n */\n request(request: IRequest): Promise<IResponse>;\n\n /**\n * Submits a container runtime level signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * @deprecated 0.16 Issue #1537, #3631\n * @internal\n */\n _createDataStoreWithProps(\n pkg: string | string[],\n props?: any,\n id?: string,\n isRoot?: boolean,\n ): Promise<IDataStore>;\n\n /**\n * Creates data store. Returns router of data store. Data store is not bound to container,\n * store in such state is not persisted to storage (file). Storing a handle to this store\n * (or any of its parts, like DDS) into already attached DDS (or non-attached DDS that will eventually\n * gets attached to storage) will result in this store being attached to storage.\n * @param pkg - Package name of the data store factory\n */\n createDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n /**\n * Creates detached data store context. Only after context.attachRuntime() is called,\n * data store initialization is considered complete.\n */\n createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n /**\n * Get an absolute url for a provided container-relative request.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n}\n\n/**\n * Minimal interface a data store runtime need to provide for IFluidDataStoreContext to bind to control\n *\n * Functionality include attach, snapshot, op/signal processing, request routes,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends\n IFluidRouter,\n IDisposable {\n\n readonly id: string;\n\n /**\n * Indicates the attachment state of the channel to a host service.\n */\n readonly attachState: AttachState;\n\n readonly visibilityState?: VisibilityState;\n\n /**\n * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.\n * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n */\n attachGraph(): void;\n\n /**\n * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n * bound handles that represent its dependencies in the container's graph.\n */\n makeVisibleAndAttachGraph(): void;\n\n /**\n * Retrieves the summary used as part of the initial summary message\n */\n getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n /**\n * Processes the op.\n */\n process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n /**\n * Processes the signal.\n */\n processSignal(message: any, local: boolean): void;\n\n /**\n * Generates a summary for the channel.\n * Introduced with summarizerNode - will be required in a future release.\n * @param fullTree - true to bypass optimizations and force a full summary tree.\n * @param trackState - This tells whether we should track state from this summary.\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree?: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummaryTreeWithStats>;\n\n /**\n * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n * including any of its children. Each node has a list of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /**\n * After GC has run, called to notify this channel of routes that are used in it.\n * @param usedRoutes - The routes that are used in this channel.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If any node becomes unreferenced\n * as part of this GC run, this should be used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * Notifies this object about changes in the connection state.\n * @param value - New connection state.\n * @param clientId - ID of the client. It's old ID when in disconnected state and\n * it's new client ID when we are connecting or connected.\n */\n setConnectionState(connected: boolean, clientId?: string);\n\n /**\n * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n reSubmit(type: string, content: any, localOpMetadata: unknown);\n\n applyStashedOp(content: any): Promise<unknown>;\n\n /**\n * Revert a local message.\n * @param type - The type of the original message.\n * @param content - The content of the original message.\n * @param localOpMetadata - The local metadata associated with the original message.\n */\n rollback?(type: string, content: any, localOpMetadata: unknown): void;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n summarizeInternal: SummarizeInternalFn,\n getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn: () => Promise<IGarbageCollectionSummaryDetails>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n (event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext extends\n IEventProvider<IFluidDataStoreContextEvents>,\n Partial<IProvideFluidDataStoreRegistry>,\n IProvideFluidHandleContext {\n readonly id: string;\n /**\n * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n * Value of this never changes even after the data store is attached.\n * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n * client and hence implement any scenario based on that.\n */\n readonly isLocalDataStore: boolean;\n /**\n * The package path of the data store as per the package factory.\n */\n readonly packagePath: readonly string[];\n readonly options: ILoaderOptions;\n readonly clientId: string | undefined;\n readonly connected: boolean;\n readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n readonly storage: IDocumentStorageService;\n readonly baseSnapshot: ISnapshotTree | undefined;\n readonly logger: ITelemetryBaseLogger;\n readonly clientDetails: IClientDetails;\n /**\n * Indicates the attachment state of the data store to a host service.\n */\n readonly attachState: AttachState;\n\n readonly containerRuntime: IContainerRuntimeBase;\n\n /**\n * @deprecated 0.16 Issue #1635, #3631\n */\n readonly createProps?: any;\n\n /**\n * Ambient services provided with the context\n */\n readonly scope: FluidObject;\n\n /**\n * Returns the current quorum.\n */\n getQuorum(): IQuorumClients;\n\n /**\n * Returns the current audience.\n */\n getAudience(): IAudience;\n\n /**\n * Submits the message to be sent to other clients.\n * @param type - Type of the message.\n * @param content - Content of the message.\n * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n * the server. This will be sent back when this message is received back from the server. This is also sent if\n * we are asked to resubmit the message.\n */\n submitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n /**\n * Submits the signal to be sent to other clients.\n * @param type - Type of the signal.\n * @param content - Content of the signal.\n */\n submitSignal(type: string, content: any): void;\n\n /**\n * Called to make the data store locally visible in the container. This happens automatically for root data stores\n * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n */\n makeLocallyVisible(): void;\n\n /**\n * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n * @param address - The address of the channel that is dirty.\n */\n setChannelDirty(address: string): void;\n\n /**\n * Get an absolute url to the container based on the provided relativeUrl.\n * Returns undefined if the container or data store isn't attached to storage.\n * @param relativeUrl - A relative request within the container\n */\n getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n getCreateChildSummarizerNodeFn(\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n ): CreateChildSummarizerNodeFn;\n\n uploadBlob(blob: ArrayBufferLike): Promise<IFluidHandle<ArrayBufferLike>>;\n\n /**\n * @deprecated - Renamed to getBaseGCDetails.\n */\n getInitialGCSummaryDetails(): Promise<IGarbageCollectionSummaryDetails>;\n\n /**\n * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n * and its children with the GC details from the previous summary.\n */\n getBaseGCDetails?(): Promise<IGarbageCollectionDetailsBase>;\n\n /**\n * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n * all references added in the system.\n * @param srcHandle - The handle of the node that added the reference.\n * @param outboundHandle - The handle of the outbound node that is referenced.\n */\n addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n /**\n * Binds a runtime to the context.\n */\n attachRuntime(\n factory: IProvideFluidDataStoreFactory,\n dataStoreRuntime: IFluidDataStoreChannel,\n ): Promise<void>;\n}\n"]}
package/dist/summary.d.ts CHANGED
@@ -23,7 +23,7 @@ export interface ISummaryStats {
23
23
  * will be taking part of the summarization process.
24
24
  */
25
25
  export interface ISummaryTreeWithStats {
26
- /** Represents an agreggation of node counts and blob sizes associated to the current summary information */
26
+ /** Represents an aggregation of node counts and blob sizes associated to the current summary information */
27
27
  stats: ISummaryStats;
28
28
  /**
29
29
  * A recursive data structure that will be converted to a snapshot tree and uploaded
@@ -39,14 +39,18 @@ export interface ISummarizeResult {
39
39
  summary: SummaryTree;
40
40
  }
41
41
  /**
42
- * Contains the same data as ISummaryResult but in order to avoid naming colisions,
42
+ * Contains the same data as ISummaryResult but in order to avoid naming collisions,
43
43
  * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.
44
- * Ex: id:""
45
- pathPartsForChildren: ["path1"]
46
- stats: ...
47
- summary:
48
- ...
49
- "path1":
44
+ *
45
+ * @example
46
+ * ```
47
+ * id:""
48
+ * pathPartsForChildren: ["path1"]
49
+ * stats: ...
50
+ * summary:
51
+ * ...
52
+ * "path1":
53
+ * ```
50
54
  */
51
55
  export interface ISummarizeInternalResult extends ISummarizeResult {
52
56
  id: string;
@@ -144,10 +148,7 @@ export interface ISummarizerNode {
144
148
  * @param readAndParseBlob - function to read and parse blobs from storage
145
149
  * @returns the base summary to be used
146
150
  */
147
- loadBaseSummary(snapshot: ISnapshotTree, readAndParseBlob: <T>(id: string) => Promise<T>): Promise<{
148
- baseSummary: ISnapshotTree;
149
- outstandingOps: ISequencedDocumentMessage[];
150
- }>;
151
+ loadBaseSummary(snapshot: ISnapshotTree, readAndParseBlob: <T>(id: string) => Promise<T>): Promise<ISnapshotTree>;
151
152
  /**
152
153
  * Records an op representing a change to this node/subtree.
153
154
  * @param op - op of change to record
@@ -170,7 +171,7 @@ export interface ISummarizerNode {
170
171
  getChild(id: string): ISummarizerNode | undefined;
171
172
  }
172
173
  /**
173
- * Extends the functionality of ISummarizerNode to support garbage collection. It adds / udpates the following APIs:
174
+ * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
174
175
  * - usedRoutes - The routes in this node that are currently in use.
175
176
  * - getGCData - A new API that can be used to get the garbage collection data for this node.
176
177
  * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the
@@ -1 +1 @@
1
- {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAA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GAAG,WAAW,CAAC;AA8B/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,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/common-definitions\";\nimport {\n SummaryTree,\n ISummaryTree,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n */\nexport interface ISummaryStats {\n treeNodeCount: number;\n blobNodeCount: number;\n handleNodeCount: number;\n totalBlobSize: number;\n unreferencedBlobSize: 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 */\nexport interface ISummaryTreeWithStats {\n /** Represents an agreggation of node counts and blob sizes associated to the current summary information */\n stats: ISummaryStats;\n /**\n * A recursive data structure that will be converted to a snapshot tree and uploaded\n * to the backend.\n */\n summary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n */\nexport interface ISummarizeResult {\n stats: ISummaryStats;\n summary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming colisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n * Ex: id:\"\"\n pathPartsForChildren: [\"path1\"]\n stats: ...\n summary:\n ...\n \"path1\":\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n id: string;\n /** Additional path parts between this node's ID and its children's IDs. */\n pathPartsForChildren?: string[];\n}\n\n/** The garbage collection data of each node in the reference graph. */\nexport interface IGarbageCollectionNodeData {\n /** The set of routes to other nodes in the graph. */\n outboundRoutes: string[];\n /** If the node is unreferenced, the timestamp of when it was marked unreferenced. */\n unreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data.\n */\nexport interface IGarbageCollectionState {\n gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };\n}\n\nexport type SummarizeInternalFn = (\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n) => Promise<ISummarizeInternalResult>;\n\nexport interface ISummarizerNodeConfig {\n /**\n * True to reuse previous handle when unchanged since last acked summary.\n * Defaults to true.\n */\n readonly canReuseHandle?: boolean;\n /**\n * True to always stop execution on error during summarize, or false to\n * attempt creating a summary that is a pointer ot the last acked summary\n * plus outstanding ops in case of internal summarize failure.\n * Defaults to false.\n *\n * BUG BUG: Default to true while we investigate problem\n * with differential summaries\n */\n readonly throwOnFailure?: true;\n}\n\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n /**\n * True if GC is disabled. If so, don't track GC related state for a summary.\n * This is propagated to all child nodes.\n */\n readonly gcDisabled?: boolean;\n}\n\nexport enum CreateSummarizerNodeSource {\n FromSummary,\n FromAttach,\n Local,\n}\nexport type CreateChildSummarizerNodeParam = {\n type: CreateSummarizerNodeSource.FromSummary;\n} | {\n type: CreateSummarizerNodeSource.FromAttach;\n sequenceNumber: number;\n snapshot: ITree;\n} | {\n type: CreateSummarizerNodeSource.Local;\n};\n\nexport interface ISummarizerNode {\n /** Latest successfully acked summary reference sequence number */\n readonly referenceSequenceNumber: number;\n /**\n * Marks the node as having a change with the given sequence number.\n * @param sequenceNumber - sequence number of change\n */\n invalidate(sequenceNumber: number): void;\n /**\n * Calls the internal summarize function and handles internal state tracking.\n * If unchanged and fullTree is false, it will reuse previous summary subtree.\n * If an error is encountered and throwOnFailure is false, it will try to make\n * a summary with a pointer to the previous summary + a blob of outstanding ops.\n * @param fullTree - true to skip optimizations and always generate the full tree\n * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult>;\n /**\n * Checks if there are any additional path parts for children that need to\n * be loaded from the base summary. Additional path parts represent parts\n * of the path between this SummarizerNode and any child SummarizerNodes\n * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n * @param snapshot - the base summary to parse\n */\n loadBaseSummaryWithoutDifferential(snapshot: ISnapshotTree): void;\n /**\n * Does all the work of loadBaseSummaryWithoutDifferential. Additionally if\n * the base summary is a differential summary containing handle + outstanding ops blob,\n * then this will return the innermost base summary, and update the state by\n * tracking the outstanding ops.\n * @param snapshot - the base summary to parse\n * @param readAndParseBlob - function to read and parse blobs from storage\n * @returns the base summary to be used\n */\n loadBaseSummary(\n snapshot: ISnapshotTree,\n readAndParseBlob: <T>(id: string) => Promise<T>,\n ): Promise<{ baseSummary: ISnapshotTree; outstandingOps: ISequencedDocumentMessage[]; }>;\n /**\n * Records an op representing a change to this node/subtree.\n * @param op - op of change to record\n */\n recordChange(op: ISequencedDocumentMessage): void;\n\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfig,\n ): ISummarizerNode;\n\n getChild(id: string): ISummarizerNode | undefined;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / udpates the following APIs:\n * - usedRoutes - The routes in this node that are currently in use.\n * - getGCData - A new API that can be used to get the garbage collection data for this node.\n * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n * - createChild - Added the following params:\n * - getGCDataFn - This gets the GC data from the caller. This must be provided in order for getGCData to work.\n * - getInitialGCDetailsFn - This gets the initial GC details from the caller.\n * - deleteChild - Deletes a child node.\n * - isReferenced - This tells whether this node is referenced in the document or not.\n * - updateUsedRoutes - Used to notify this node of routes that are currently in use in it.\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfigWithGC,\n getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn?: () => Promise<IGarbageCollectionSummaryDetails>,\n ): ISummarizerNodeWithGC;\n\n /**\n * Delete the child with the given id..\n */\n deleteChild(id: string): void;\n\n getChild(id: string): ISummarizerNodeWithGC | undefined;\n\n /**\n * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n * this node. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /** Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd */\n isReferenced(): boolean;\n\n /**\n * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n * 1. To identify if this node is being referenced in the document or not.\n * 2. To identify if this node or any of its children's used routes changed since last summary.\n *\n * @param usedRoutes - The routes that are used in this node.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If a node becomes unreferenced\n * as part of this GC run, this timestamp is used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * @deprecated - Renamed to getBaseGCDetails.\n * Returns the GC details that may be added to this node's summary.\n */\n getGCSummaryDetails(): IGarbageCollectionSummaryDetails;\n\n /** Returns the GC details to be added to this node's summary and is used to initialize new nodes' GC state. */\n getBaseGCDetails?(): IGarbageCollectionDetailsBase;\n}\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 */\nexport interface ITelemetryContext {\n /**\n * Sets value for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @param value - value to attribute to this summary telemetry data\n */\n set(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n /**\n * Get the telemetry data being tracked\n * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @returns undefined if item not found\n */\n get(prefix: string, property: string): TelemetryEventPropertyType;\n\n /**\n * Returns a serialized version of all the telemetry data.\n * Should be used when logging in telemetry events.\n */\n serialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwHH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACT,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AAsJY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA8B/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,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/common-definitions\";\nimport {\n SummaryTree,\n ISummaryTree,\n ISequencedDocumentMessage,\n ISnapshotTree,\n ITree,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n IGarbageCollectionData,\n IGarbageCollectionDetailsBase,\n IGarbageCollectionSummaryDetails,\n} from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n */\nexport interface ISummaryStats {\n treeNodeCount: number;\n blobNodeCount: number;\n handleNodeCount: number;\n totalBlobSize: number;\n unreferencedBlobSize: 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 */\nexport interface ISummaryTreeWithStats {\n /** Represents an aggregation of node counts and blob sizes associated to the current summary information */\n stats: ISummaryStats;\n /**\n * A recursive data structure that will be converted to a snapshot tree and uploaded\n * to the backend.\n */\n summary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n */\nexport interface ISummarizeResult {\n stats: ISummaryStats;\n summary: 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 * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n id: string;\n /** Additional path parts between this node's ID and its children's IDs. */\n pathPartsForChildren?: string[];\n}\n\n/** The garbage collection data of each node in the reference graph. */\nexport interface IGarbageCollectionNodeData {\n /** The set of routes to other nodes in the graph. */\n outboundRoutes: string[];\n /** If the node is unreferenced, the timestamp of when it was marked unreferenced. */\n unreferencedTimestampMs?: number;\n}\n\n/**\n * The garbage collection state of the reference graph. It contains a list of all the nodes in the graph and their\n * GC data.\n */\nexport interface IGarbageCollectionState {\n gcNodes: { [ id: string ]: IGarbageCollectionNodeData; };\n}\n\nexport type SummarizeInternalFn = (\n fullTree: boolean,\n trackState: boolean,\n telemetryContext?: ITelemetryContext,\n) => Promise<ISummarizeInternalResult>;\n\nexport interface ISummarizerNodeConfig {\n /**\n * True to reuse previous handle when unchanged since last acked summary.\n * Defaults to true.\n */\n readonly canReuseHandle?: boolean;\n /**\n * True to always stop execution on error during summarize, or false to\n * attempt creating a summary that is a pointer ot the last acked summary\n * plus outstanding ops in case of internal summarize failure.\n * Defaults to false.\n *\n * BUG BUG: Default to true while we investigate problem\n * with differential summaries\n */\n readonly throwOnFailure?: true;\n}\n\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n /**\n * True if GC is disabled. If so, don't track GC related state for a summary.\n * This is propagated to all child nodes.\n */\n readonly gcDisabled?: boolean;\n}\n\nexport enum CreateSummarizerNodeSource {\n FromSummary,\n FromAttach,\n Local,\n}\nexport type CreateChildSummarizerNodeParam = {\n type: CreateSummarizerNodeSource.FromSummary;\n} | {\n type: CreateSummarizerNodeSource.FromAttach;\n sequenceNumber: number;\n snapshot: ITree;\n} | {\n type: CreateSummarizerNodeSource.Local;\n};\n\nexport interface ISummarizerNode {\n /** Latest successfully acked summary reference sequence number */\n readonly referenceSequenceNumber: number;\n /**\n * Marks the node as having a change with the given sequence number.\n * @param sequenceNumber - sequence number of change\n */\n invalidate(sequenceNumber: number): void;\n /**\n * Calls the internal summarize function and handles internal state tracking.\n * If unchanged and fullTree is false, it will reuse previous summary subtree.\n * If an error is encountered and throwOnFailure is false, it will try to make\n * a summary with a pointer to the previous summary + a blob of outstanding ops.\n * @param fullTree - true to skip optimizations and always generate the full tree\n * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n * @param telemetryContext - summary data passed through the layers for telemetry purposes\n */\n summarize(\n fullTree: boolean,\n trackState?: boolean,\n telemetryContext?: ITelemetryContext,\n ): Promise<ISummarizeResult>;\n /**\n * Checks if there are any additional path parts for children that need to\n * be loaded from the base summary. Additional path parts represent parts\n * of the path between this SummarizerNode and any child SummarizerNodes\n * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n * @param snapshot - the base summary to parse\n */\n loadBaseSummaryWithoutDifferential(snapshot: ISnapshotTree): void;\n /**\n * Does all the work of loadBaseSummaryWithoutDifferential. Additionally if\n * the base summary is a differential summary containing handle + outstanding ops blob,\n * then this will return the innermost base summary, and update the state by\n * tracking the outstanding ops.\n * @param snapshot - the base summary to parse\n * @param readAndParseBlob - function to read and parse blobs from storage\n * @returns the base summary to be used\n */\n loadBaseSummary(\n snapshot: ISnapshotTree,\n readAndParseBlob: <T>(id: string) => Promise<T>,\n ): Promise<ISnapshotTree>;\n /**\n * Records an op representing a change to this node/subtree.\n * @param op - op of change to record\n */\n recordChange(op: ISequencedDocumentMessage): void;\n\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfig,\n ): ISummarizerNode;\n\n getChild(id: string): ISummarizerNode | undefined;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n * - usedRoutes - The routes in this node that are currently in use.\n * - getGCData - A new API that can be used to get the garbage collection data for this node.\n * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n * - createChild - Added the following params:\n * - getGCDataFn - This gets the GC data from the caller. This must be provided in order for getGCData to work.\n * - getInitialGCDetailsFn - This gets the initial GC details from the caller.\n * - deleteChild - Deletes a child node.\n * - isReferenced - This tells whether this node is referenced in the document or not.\n * - updateUsedRoutes - Used to notify this node of routes that are currently in use in it.\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n createChild(\n /** Summarize function */\n summarizeInternalFn: SummarizeInternalFn,\n /** Initial id or path part of this node */\n id: string,\n /**\n * Information needed to create the node.\n * If it is from a base summary, it will assert that a summary has been seen.\n * Attach information if it is created from an attach op.\n * If it is local, it will throw unsupported errors on calls to summarize.\n */\n createParam: CreateChildSummarizerNodeParam,\n /** Optional configuration affecting summarize behavior */\n config?: ISummarizerNodeConfigWithGC,\n getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n getInitialGCSummaryDetailsFn?: () => Promise<IGarbageCollectionSummaryDetails>,\n ): ISummarizerNodeWithGC;\n\n /**\n * Delete the child with the given id..\n */\n deleteChild(id: string): void;\n\n getChild(id: string): ISummarizerNodeWithGC | undefined;\n\n /**\n * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n * this node. Each node has a set of outbound routes to other GC nodes in the document.\n * @param fullGC - true to bypass optimizations and force full generation of GC data.\n */\n getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n /** Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd */\n isReferenced(): boolean;\n\n /**\n * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n * 1. To identify if this node is being referenced in the document or not.\n * 2. To identify if this node or any of its children's used routes changed since last summary.\n *\n * @param usedRoutes - The routes that are used in this node.\n * @param gcTimestamp - The time when GC was run that generated these used routes. If a node becomes unreferenced\n * as part of this GC run, this timestamp is used to update the time when it happens.\n */\n updateUsedRoutes(usedRoutes: string[], gcTimestamp?: number): void;\n\n /**\n * @deprecated - Renamed to getBaseGCDetails.\n * Returns the GC details that may be added to this node's summary.\n */\n getGCSummaryDetails(): IGarbageCollectionSummaryDetails;\n\n /** Returns the GC details to be added to this node's summary and is used to initialize new nodes' GC state. */\n getBaseGCDetails?(): IGarbageCollectionDetailsBase;\n}\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 */\nexport interface ITelemetryContext {\n /**\n * Sets value for telemetry data being tracked.\n * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @param value - value to attribute to this summary telemetry data\n */\n set(prefix: string, property: string, value: TelemetryEventPropertyType): void;\n\n /**\n * Get the telemetry data being tracked\n * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n * @returns undefined if item not found\n */\n get(prefix: string, property: string): TelemetryEventPropertyType;\n\n /**\n * Returns a serialized version of all the telemetry data.\n * Should be used when logging in telemetry events.\n */\n serialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "1.2.0",
3
+ "version": "2.0.0-internal.1.0.0.81589",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -34,17 +34,17 @@
34
34
  "dependencies": {
35
35
  "@fluidframework/common-definitions": "^0.20.1",
36
36
  "@fluidframework/common-utils": "^0.32.1",
37
- "@fluidframework/container-definitions": "^1.2.0",
38
- "@fluidframework/core-interfaces": "^1.2.0",
39
- "@fluidframework/driver-definitions": "^1.2.0",
40
- "@fluidframework/protocol-definitions": "^0.1028.2000",
37
+ "@fluidframework/container-definitions": "2.0.0-internal.1.0.0.81589",
38
+ "@fluidframework/core-interfaces": "2.0.0-internal.1.0.0.81589",
39
+ "@fluidframework/driver-definitions": "2.0.0-internal.1.0.0.81589",
40
+ "@fluidframework/protocol-definitions": "^0.1029.1000-0",
41
41
  "@types/node": "^14.18.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@fluidframework/build-common": "^0.24.0",
45
- "@fluidframework/build-tools": "^0.2.74327",
45
+ "@fluidframework/build-tools": "^0.3.0-0",
46
46
  "@fluidframework/eslint-config-fluid": "^0.28.2000",
47
- "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@1.1.0",
47
+ "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@^1.0.0",
48
48
  "@microsoft/api-extractor": "^7.22.2",
49
49
  "@rushstack/eslint-config": "^2.5.1",
50
50
  "concurrently": "^6.2.0",
@@ -55,7 +55,23 @@
55
55
  "typescript-formatter": "7.1.0"
56
56
  },
57
57
  "typeValidation": {
58
- "version": "1.2.0",
59
- "broken": {}
58
+ "version": "2.0.0",
59
+ "broken": {
60
+ "TypeAliasDeclaration_AliasResult": {
61
+ "forwardCompat": false
62
+ },
63
+ "InterfaceDeclaration_IFluidDataStoreContext": {
64
+ "backCompat": false,
65
+ "forwardCompat": false
66
+ },
67
+ "InterfaceDeclaration_IFluidDataStoreChannel": {
68
+ "backCompat": false,
69
+ "forwardCompat": false
70
+ },
71
+ "InterfaceDeclaration_IFluidDataStoreContextDetached": {
72
+ "backCompat": false,
73
+ "forwardCompat": false
74
+ }
75
+ }
60
76
  }
61
77
  }
@@ -97,10 +97,9 @@ export interface IContainerRuntimeBaseEvents extends IEvent{
97
97
  * 'Conflict' - there is already a datastore bound to the provided alias. To acquire a handle to it,
98
98
  * use the `IContainerRuntime.getRootDataStore` function. The current datastore should be discarded
99
99
  * and will be garbage collected. The current datastore cannot be aliased to a different value.
100
- * 'Aliasing' (deprecated) - this value is never returned.
101
100
  * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.
102
101
  */
103
- export type AliasResult = "Success" | "Conflict" | "Aliasing" | "AlreadyAliased";
102
+ export type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
104
103
 
105
104
  /**
106
105
  * A fluid router with the capability of being assigned an alias
@@ -172,8 +171,8 @@ export interface IContainerRuntimeBase extends
172
171
  createDataStore(pkg: string | string[]): Promise<IDataStore>;
173
172
 
174
173
  /**
175
- * Creates detached data store context. only after context.attachRuntime() is called,
176
- * data store initialization is considered compete.
174
+ * Creates detached data store context. Only after context.attachRuntime() is called,
175
+ * data store initialization is considered complete.
177
176
  */
178
177
  createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
179
178
 
@@ -216,13 +215,6 @@ export interface IFluidDataStoreChannel extends
216
215
 
217
216
  readonly visibilityState?: VisibilityState;
218
217
 
219
- /**
220
- * @deprecated - This is an internal method that should not be exposed.
221
- * Called to bind the runtime to the container.
222
- * If the container is not attached to storage, then this would also be unknown to other clients.
223
- */
224
- bindToContext(): void;
225
-
226
218
  /**
227
219
  * @deprecated - This will be removed in favor of makeVisibleAndAttachGraph.
228
220
  * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.
@@ -233,7 +225,7 @@ export interface IFluidDataStoreChannel extends
233
225
  * Makes the data store channel visible in the container. Also, runs through its graph and attaches all
234
226
  * bound handles that represent its dependencies in the container's graph.
235
227
  */
236
- makeVisibleAndAttachGraph?(): void;
228
+ makeVisibleAndAttachGraph(): void;
237
229
 
238
230
  /**
239
231
  * Retrieves the summary used as part of the initial summary message
@@ -389,17 +381,11 @@ export interface IFluidDataStoreContext extends
389
381
  */
390
382
  submitSignal(type: string, content: any): void;
391
383
 
392
- /**
393
- * @deprecated - To be removed in favor of makeVisible.
394
- * Register the runtime to the container
395
- */
396
- bindToContext(): void;
397
-
398
384
  /**
399
385
  * Called to make the data store locally visible in the container. This happens automatically for root data stores
400
386
  * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
401
387
  */
402
- makeLocallyVisible?(): void;
388
+ makeLocallyVisible(): void;
403
389
 
404
390
  /**
405
391
  * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
package/src/summary.ts CHANGED
@@ -36,7 +36,7 @@ export interface ISummaryStats {
36
36
  * will be taking part of the summarization process.
37
37
  */
38
38
  export interface ISummaryTreeWithStats {
39
- /** Represents an agreggation of node counts and blob sizes associated to the current summary information */
39
+ /** Represents an aggregation of node counts and blob sizes associated to the current summary information */
40
40
  stats: ISummaryStats;
41
41
  /**
42
42
  * A recursive data structure that will be converted to a snapshot tree and uploaded
@@ -54,14 +54,18 @@ export interface ISummarizeResult {
54
54
  }
55
55
 
56
56
  /**
57
- * Contains the same data as ISummaryResult but in order to avoid naming colisions,
57
+ * Contains the same data as ISummaryResult but in order to avoid naming collisions,
58
58
  * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.
59
- * Ex: id:""
60
- pathPartsForChildren: ["path1"]
61
- stats: ...
62
- summary:
63
- ...
64
- "path1":
59
+ *
60
+ * @example
61
+ * ```
62
+ * id:""
63
+ * pathPartsForChildren: ["path1"]
64
+ * stats: ...
65
+ * summary:
66
+ * ...
67
+ * "path1":
68
+ * ```
65
69
  */
66
70
  export interface ISummarizeInternalResult extends ISummarizeResult {
67
71
  id: string;
@@ -175,7 +179,7 @@ export interface ISummarizerNode {
175
179
  loadBaseSummary(
176
180
  snapshot: ISnapshotTree,
177
181
  readAndParseBlob: <T>(id: string) => Promise<T>,
178
- ): Promise<{ baseSummary: ISnapshotTree; outstandingOps: ISequencedDocumentMessage[]; }>;
182
+ ): Promise<ISnapshotTree>;
179
183
  /**
180
184
  * Records an op representing a change to this node/subtree.
181
185
  * @param op - op of change to record
@@ -202,7 +206,7 @@ export interface ISummarizerNode {
202
206
  }
203
207
 
204
208
  /**
205
- * Extends the functionality of ISummarizerNode to support garbage collection. It adds / udpates the following APIs:
209
+ * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
206
210
  * - usedRoutes - The routes in this node that are currently in use.
207
211
  * - getGCData - A new API that can be used to get the garbage collection data for this node.
208
212
  * - summarize - Added a trackState flag which indicates whether the summarizer node should track the state of the