@fluidframework/container-runtime 0.56.6 → 0.56.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containerRuntime.d.ts +6 -1
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +49 -7
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -7
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +10 -6
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/containerRuntime.d.ts +6 -1
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +49 -7
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -7
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +10 -6
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +11 -11
- package/src/containerRuntime.ts +63 -1
- package/src/dataStoreContext.ts +10 -13
- package/src/packageVersion.ts +1 -1
package/src/dataStoreContext.ts
CHANGED
|
@@ -106,11 +106,6 @@ export function createAttributesBlob(
|
|
|
106
106
|
|
|
107
107
|
interface ISnapshotDetails {
|
|
108
108
|
pkg: readonly string[];
|
|
109
|
-
/**
|
|
110
|
-
* This tells whether a data store is root. Root data stores are never collected.
|
|
111
|
-
* Non-root data stores may be collected if they are not used.
|
|
112
|
-
*/
|
|
113
|
-
isRootDataStore: boolean;
|
|
114
109
|
snapshot?: ISnapshotTree;
|
|
115
110
|
}
|
|
116
111
|
|
|
@@ -212,7 +207,10 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidData
|
|
|
212
207
|
}
|
|
213
208
|
|
|
214
209
|
public async isRoot(): Promise<boolean> {
|
|
215
|
-
|
|
210
|
+
// This call updates this.isRootDataStore if it has not yet been updated
|
|
211
|
+
// The initial value is stored in the initial snapshot of the data store
|
|
212
|
+
await this.getInitialSnapshotDetails();
|
|
213
|
+
return this.isRootDataStore;
|
|
216
214
|
}
|
|
217
215
|
|
|
218
216
|
protected registry: IFluidDataStoreRegistry | undefined;
|
|
@@ -225,6 +223,7 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidData
|
|
|
225
223
|
protected channelDeferred: Deferred<IFluidDataStoreChannel> | undefined;
|
|
226
224
|
private _baseSnapshot: ISnapshotTree | undefined;
|
|
227
225
|
protected _attachState: AttachState;
|
|
226
|
+
protected isRootDataStore: boolean = false;
|
|
228
227
|
protected readonly summarizerNode: ISummarizerNodeWithGC;
|
|
229
228
|
private readonly subLogger: ITelemetryLogger;
|
|
230
229
|
private readonly thresholdOpsCounter: ThresholdCounter;
|
|
@@ -450,8 +449,8 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidData
|
|
|
450
449
|
}
|
|
451
450
|
|
|
452
451
|
// Add data store's attributes to the summary.
|
|
453
|
-
const { pkg
|
|
454
|
-
const attributes = createAttributes(pkg, isRootDataStore, this.disableIsolatedChannels);
|
|
452
|
+
const { pkg } = await this.getInitialSnapshotDetails();
|
|
453
|
+
const attributes = createAttributes(pkg, this.isRootDataStore, this.disableIsolatedChannels);
|
|
455
454
|
addBlobToSummary(summarizeResult, dataStoreAttributesBlobName, JSON.stringify(attributes));
|
|
456
455
|
|
|
457
456
|
// Add GC data to the summary if it's not written at the root.
|
|
@@ -729,7 +728,6 @@ export abstract class FluidDataStoreContext extends TypedEventEmitter<IFluidData
|
|
|
729
728
|
}
|
|
730
729
|
|
|
731
730
|
export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
732
|
-
private isRootDataStore: boolean | undefined;
|
|
733
731
|
private readonly initSnapshotValue: ISnapshotTree | string | undefined;
|
|
734
732
|
private readonly baseGCDetailsP: Promise<IGarbageCollectionDetailsBase>;
|
|
735
733
|
|
|
@@ -804,11 +802,12 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
804
802
|
}
|
|
805
803
|
}
|
|
806
804
|
|
|
805
|
+
this.isRootDataStore = isRootDataStore;
|
|
806
|
+
|
|
807
807
|
return {
|
|
808
808
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
809
809
|
pkg: this.pkg!,
|
|
810
810
|
snapshot: tree,
|
|
811
|
-
isRootDataStore,
|
|
812
811
|
};
|
|
813
812
|
});
|
|
814
813
|
|
|
@@ -846,7 +845,6 @@ export class RemoteFluidDataStoreContext extends FluidDataStoreContext {
|
|
|
846
845
|
*/
|
|
847
846
|
export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
848
847
|
private readonly snapshotTree: ISnapshotTree | undefined;
|
|
849
|
-
protected isRootDataStore: boolean | undefined;
|
|
850
848
|
/**
|
|
851
849
|
* @deprecated 0.16 Issue #1635, #3631
|
|
852
850
|
*/
|
|
@@ -862,7 +860,7 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
862
860
|
);
|
|
863
861
|
|
|
864
862
|
this.snapshotTree = props.snapshotTree;
|
|
865
|
-
this.isRootDataStore = props.isRootDataStore;
|
|
863
|
+
this.isRootDataStore = props.isRootDataStore ?? false;
|
|
866
864
|
this.createProps = props.createProps;
|
|
867
865
|
this.attachListeners();
|
|
868
866
|
}
|
|
@@ -938,7 +936,6 @@ export class LocalFluidDataStoreContextBase extends FluidDataStoreContext {
|
|
|
938
936
|
return {
|
|
939
937
|
pkg: this.pkg,
|
|
940
938
|
snapshot,
|
|
941
|
-
isRootDataStore: this.isRootDataStore,
|
|
942
939
|
};
|
|
943
940
|
}
|
|
944
941
|
|
package/src/packageVersion.ts
CHANGED