@fluidframework/datastore 0.59.2000 → 0.59.3000-67119
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/channelContext.js +2 -2
- package/dist/channelContext.js.map +1 -1
- package/dist/channelDeltaConnection.js +2 -2
- package/dist/channelDeltaConnection.js.map +1 -1
- package/dist/channelStorageService.d.ts +1 -1
- package/dist/channelStorageService.d.ts.map +1 -1
- package/dist/channelStorageService.js +1 -1
- package/dist/channelStorageService.js.map +1 -1
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +37 -37
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/fluidHandle.js +1 -1
- package/dist/fluidHandle.js.map +1 -1
- package/dist/localChannelContext.js +19 -19
- package/dist/localChannelContext.js.map +1 -1
- package/dist/localChannelStorageService.js +2 -2
- package/dist/localChannelStorageService.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/remoteChannelContext.d.ts.map +1 -1
- package/dist/remoteChannelContext.js +21 -12
- package/dist/remoteChannelContext.js.map +1 -1
- package/lib/channelStorageService.d.ts +1 -1
- package/lib/channelStorageService.d.ts.map +1 -1
- package/lib/channelStorageService.js.map +1 -1
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +8 -8
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/localChannelContext.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/remoteChannelContext.d.ts.map +1 -1
- package/lib/remoteChannelContext.js +12 -3
- package/lib/remoteChannelContext.js.map +1 -1
- package/package.json +16 -15
- package/src/channelStorageService.ts +3 -3
- package/src/dataStoreRuntime.ts +8 -9
- package/src/localChannelContext.ts +7 -7
- package/src/packageVersion.ts +1 -1
- package/src/remoteChannelContext.ts +15 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/datastore",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.3000-67119",
|
|
4
4
|
"description": "Fluid data store implementation",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -64,26 +64,27 @@
|
|
|
64
64
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
65
65
|
"@fluidframework/common-utils": "^0.32.1",
|
|
66
66
|
"@fluidframework/container-definitions": "^0.48.1000",
|
|
67
|
-
"@fluidframework/container-utils": "
|
|
67
|
+
"@fluidframework/container-utils": "0.59.3000-67119",
|
|
68
68
|
"@fluidframework/core-interfaces": "^0.43.1000",
|
|
69
|
-
"@fluidframework/datastore-definitions": "
|
|
69
|
+
"@fluidframework/datastore-definitions": "0.59.3000-67119",
|
|
70
70
|
"@fluidframework/driver-definitions": "^0.46.1000",
|
|
71
|
-
"@fluidframework/driver-utils": "
|
|
72
|
-
"@fluidframework/garbage-collector": "
|
|
73
|
-
"@fluidframework/protocol-base": "^0.1036.
|
|
71
|
+
"@fluidframework/driver-utils": "0.59.3000-67119",
|
|
72
|
+
"@fluidframework/garbage-collector": "0.59.3000-67119",
|
|
73
|
+
"@fluidframework/protocol-base": "^0.1036.3000-66438",
|
|
74
74
|
"@fluidframework/protocol-definitions": "^0.1028.1000",
|
|
75
|
-
"@fluidframework/runtime-definitions": "
|
|
76
|
-
"@fluidframework/runtime-utils": "
|
|
77
|
-
"@fluidframework/telemetry-utils": "
|
|
75
|
+
"@fluidframework/runtime-definitions": "0.59.3000-67119",
|
|
76
|
+
"@fluidframework/runtime-utils": "0.59.3000-67119",
|
|
77
|
+
"@fluidframework/telemetry-utils": "0.59.3000-67119",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"uuid": "^8.3.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@fluidframework/build-common": "^0.23.0",
|
|
83
|
-
"@fluidframework/
|
|
84
|
-
"@fluidframework/
|
|
85
|
-
"@fluidframework/
|
|
86
|
-
"@fluidframework/test-
|
|
83
|
+
"@fluidframework/build-tools": "^0.2.66793",
|
|
84
|
+
"@fluidframework/datastore-previous": "npm:@fluidframework/datastore@0.59.2000",
|
|
85
|
+
"@fluidframework/eslint-config-fluid": "^0.28.2000-0",
|
|
86
|
+
"@fluidframework/mocha-test-setup": "0.59.3000-67119",
|
|
87
|
+
"@fluidframework/test-runtime-utils": "0.59.3000-67119",
|
|
87
88
|
"@microsoft/api-extractor": "^7.22.2",
|
|
88
89
|
"@rushstack/eslint-config": "^2.5.1",
|
|
89
90
|
"@types/mocha": "^8.2.2",
|
|
@@ -107,11 +108,11 @@
|
|
|
107
108
|
"mocha": "^8.4.0",
|
|
108
109
|
"nyc": "^15.0.0",
|
|
109
110
|
"rimraf": "^2.6.2",
|
|
110
|
-
"typescript": "~4.
|
|
111
|
+
"typescript": "~4.5.5",
|
|
111
112
|
"typescript-formatter": "7.1.0"
|
|
112
113
|
},
|
|
113
114
|
"typeValidation": {
|
|
114
|
-
"version": "0.59.
|
|
115
|
+
"version": "0.59.3000",
|
|
115
116
|
"broken": {}
|
|
116
117
|
}
|
|
117
118
|
}
|
|
@@ -10,7 +10,7 @@ import { getNormalizedObjectStoragePathParts } from "@fluidframework/runtime-uti
|
|
|
10
10
|
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
11
11
|
|
|
12
12
|
export class ChannelStorageService implements IChannelStorageService {
|
|
13
|
-
private static flattenTree(base: string, tree: ISnapshotTree, results: { [path: string]: string }) {
|
|
13
|
+
private static flattenTree(base: string, tree: ISnapshotTree, results: { [path: string]: string; }) {
|
|
14
14
|
// eslint-disable-next-line guard-for-in, no-restricted-syntax
|
|
15
15
|
for (const path in tree.trees) {
|
|
16
16
|
ChannelStorageService.flattenTree(`${base}${path}/`, tree.trees[path], results);
|
|
@@ -22,7 +22,7 @@ export class ChannelStorageService implements IChannelStorageService {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
private readonly flattenedTree: { [path: string]: string };
|
|
25
|
+
private readonly flattenedTree: { [path: string]: string; };
|
|
26
26
|
|
|
27
27
|
constructor(
|
|
28
28
|
private readonly tree: ISnapshotTree | undefined,
|
|
@@ -51,7 +51,7 @@ export class ChannelStorageService implements IChannelStorageService {
|
|
|
51
51
|
return blob;
|
|
52
52
|
}
|
|
53
53
|
const blobP = this.storage.readBlob(id);
|
|
54
|
-
blobP.catch((error) => this.logger.sendErrorEvent({ eventName: "ChannelStorageBlobError"}, error));
|
|
54
|
+
blobP.catch((error) => this.logger.sendErrorEvent({ eventName: "ChannelStorageBlobError" }, error));
|
|
55
55
|
|
|
56
56
|
return blobP;
|
|
57
57
|
}
|
package/src/dataStoreRuntime.ts
CHANGED
|
@@ -69,6 +69,7 @@ import {
|
|
|
69
69
|
} from "@fluidframework/datastore-definitions";
|
|
70
70
|
import {
|
|
71
71
|
GCDataBuilder,
|
|
72
|
+
removeRouteFromAllNodes,
|
|
72
73
|
unpackChildNodesGCDetails,
|
|
73
74
|
unpackChildNodesUsedRoutes,
|
|
74
75
|
} from "@fluidframework/garbage-collector";
|
|
@@ -183,7 +184,7 @@ IFluidDataStoreChannel, IFluidDataStoreRuntime, IFluidHandleContext {
|
|
|
183
184
|
this.logger = ChildLogger.create(
|
|
184
185
|
dataStoreContext.logger,
|
|
185
186
|
"FluidDataStoreRuntime",
|
|
186
|
-
{all:{ dataStoreId: uuid() }},
|
|
187
|
+
{ all: { dataStoreId: uuid() } },
|
|
187
188
|
);
|
|
188
189
|
|
|
189
190
|
this.id = dataStoreContext.id;
|
|
@@ -675,6 +676,10 @@ IFluidDataStoreChannel, IFluidDataStoreRuntime, IFluidHandleContext {
|
|
|
675
676
|
let channelBaseGCDetails = (await this.channelsBaseGCDetails).get(channelId);
|
|
676
677
|
if (channelBaseGCDetails === undefined) {
|
|
677
678
|
channelBaseGCDetails = {};
|
|
679
|
+
} else if (channelBaseGCDetails.gcData?.gcNodes !== undefined) {
|
|
680
|
+
// Note: if the child channel has an explicit handle route to its parent, it will be removed here and
|
|
681
|
+
// expected to be added back by the parent when getGCData is called.
|
|
682
|
+
removeRouteFromAllNodes(channelBaseGCDetails.gcData.gcNodes, this.absolutePath);
|
|
678
683
|
}
|
|
679
684
|
|
|
680
685
|
// Currently, channel context's are always considered used. So, it there are no used routes for it, we still
|
|
@@ -703,13 +708,7 @@ IFluidDataStoreChannel, IFluidDataStoreRuntime, IFluidHandleContext {
|
|
|
703
708
|
// (i.e. it has a base mapping) - then we go ahead and summarize
|
|
704
709
|
return isAttached;
|
|
705
710
|
}).map(async ([contextId, context]) => {
|
|
706
|
-
|
|
707
|
-
// BlobAggregationStorage relies on this behavior, as it aggregates blobs across DDSs.
|
|
708
|
-
// Not generating full summary will mean data loss, as we will overwrite aggregate blob in new summary,
|
|
709
|
-
// and any virtual blobs that stayed (for unchanged DDSs) will need aggregate blob in previous summary
|
|
710
|
-
// that is no longer present in this summary.
|
|
711
|
-
// This is temporal limitation that can be lifted in future once BlobAggregationStorage becomes smarter.
|
|
712
|
-
const contextSummary = await context.summarize(true /* fullTree */, trackState);
|
|
711
|
+
const contextSummary = await context.summarize(fullTree, trackState);
|
|
713
712
|
summaryBuilder.addWithStats(contextId, contextSummary);
|
|
714
713
|
}));
|
|
715
714
|
|
|
@@ -958,7 +957,7 @@ export const mixinRequestHandler = (
|
|
|
958
957
|
* @param Base - base class, inherits from FluidDataStoreRuntime
|
|
959
958
|
*/
|
|
960
959
|
export const mixinSummaryHandler = (
|
|
961
|
-
handler: (runtime: FluidDataStoreRuntime) => Promise<{ path: string[]
|
|
960
|
+
handler: (runtime: FluidDataStoreRuntime) => Promise<{ path: string[]; content: string; } | undefined >,
|
|
962
961
|
Base: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,
|
|
963
962
|
) => class RuntimeWithSummarizerHandler extends Base {
|
|
964
963
|
private addBlob(summary: ISummaryTreeWithStats, path: string[], content: string) {
|
|
@@ -46,8 +46,8 @@ export abstract class LocalChannelContextBase implements IChannelContext {
|
|
|
46
46
|
protected readonly registry: ISharedObjectRegistry,
|
|
47
47
|
protected readonly runtime: IFluidDataStoreRuntime,
|
|
48
48
|
private readonly servicesGetter: () => Lazy<{
|
|
49
|
-
readonly deltaConnection: ChannelDeltaConnection
|
|
50
|
-
readonly objectStorage: ChannelStorageService
|
|
49
|
+
readonly deltaConnection: ChannelDeltaConnection;
|
|
50
|
+
readonly objectStorage: ChannelStorageService;
|
|
51
51
|
}>,
|
|
52
52
|
) {
|
|
53
53
|
}
|
|
@@ -142,8 +142,8 @@ export abstract class LocalChannelContextBase implements IChannelContext {
|
|
|
142
142
|
|
|
143
143
|
export class RehydratedLocalChannelContext extends LocalChannelContextBase {
|
|
144
144
|
private readonly services: Lazy<{
|
|
145
|
-
readonly deltaConnection: ChannelDeltaConnection
|
|
146
|
-
readonly objectStorage: ChannelStorageService
|
|
145
|
+
readonly deltaConnection: ChannelDeltaConnection;
|
|
146
|
+
readonly objectStorage: ChannelStorageService;
|
|
147
147
|
}>;
|
|
148
148
|
|
|
149
149
|
private readonly dirtyFn: () => void;
|
|
@@ -232,7 +232,7 @@ export class RehydratedLocalChannelContext extends LocalChannelContextBase {
|
|
|
232
232
|
blobMap: Map<string, ArrayBufferLike>,
|
|
233
233
|
): boolean {
|
|
234
234
|
let sanitize = false;
|
|
235
|
-
const blobsContents: {[path: string]: ArrayBufferLike} = (snapshotTree as any).blobsContents;
|
|
235
|
+
const blobsContents: { [path: string]: ArrayBufferLike; } = (snapshotTree as any).blobsContents;
|
|
236
236
|
Object.entries(blobsContents).forEach(([key, value]) => {
|
|
237
237
|
blobMap.set(key, value);
|
|
238
238
|
if (snapshotTree.blobs[key] !== undefined) {
|
|
@@ -262,8 +262,8 @@ export class RehydratedLocalChannelContext extends LocalChannelContextBase {
|
|
|
262
262
|
|
|
263
263
|
export class LocalChannelContext extends LocalChannelContextBase {
|
|
264
264
|
private readonly services: Lazy<{
|
|
265
|
-
readonly deltaConnection: ChannelDeltaConnection
|
|
266
|
-
readonly objectStorage: ChannelStorageService
|
|
265
|
+
readonly deltaConnection: ChannelDeltaConnection;
|
|
266
|
+
readonly objectStorage: ChannelStorageService;
|
|
267
267
|
}>;
|
|
268
268
|
private readonly dirtyFn: () => void;
|
|
269
269
|
constructor(
|
package/src/packageVersion.ts
CHANGED
|
@@ -45,8 +45,8 @@ export class RemoteChannelContext implements IChannelContext {
|
|
|
45
45
|
private channelP: Promise<IChannel> | undefined;
|
|
46
46
|
private channel: IChannel | undefined;
|
|
47
47
|
private readonly services: {
|
|
48
|
-
readonly deltaConnection: ChannelDeltaConnection
|
|
49
|
-
readonly objectStorage: ChannelStorageService
|
|
48
|
+
readonly deltaConnection: ChannelDeltaConnection;
|
|
49
|
+
readonly objectStorage: ChannelStorageService;
|
|
50
50
|
};
|
|
51
51
|
private readonly summarizerNode: ISummarizerNodeWithGC;
|
|
52
52
|
private readonly subLogger: ITelemetryLogger;
|
|
@@ -173,7 +173,10 @@ export class RemoteChannelContext implements IChannelContext {
|
|
|
173
173
|
if (this.attachMessageType === undefined) {
|
|
174
174
|
// TODO: dataStoreId may require a different tag from PackageData #7488
|
|
175
175
|
throw new DataCorruptionError("channelTypeNotAvailable", {
|
|
176
|
-
channelId:
|
|
176
|
+
channelId: {
|
|
177
|
+
value: this.id,
|
|
178
|
+
tag: TelemetryDataTag.PackageData,
|
|
179
|
+
},
|
|
177
180
|
dataStoreId: {
|
|
178
181
|
value: this.dataStoreContext.id,
|
|
179
182
|
tag: TelemetryDataTag.PackageData,
|
|
@@ -185,7 +188,10 @@ export class RemoteChannelContext implements IChannelContext {
|
|
|
185
188
|
if (factory === undefined) {
|
|
186
189
|
// TODO: dataStoreId may require a different tag from PackageData #7488
|
|
187
190
|
throw new DataCorruptionError("channelFactoryNotRegisteredForAttachMessageType", {
|
|
188
|
-
channelId:
|
|
191
|
+
channelId: {
|
|
192
|
+
value: this.id,
|
|
193
|
+
tag: TelemetryDataTag.PackageData,
|
|
194
|
+
},
|
|
189
195
|
dataStoreId: {
|
|
190
196
|
value: this.dataStoreContext.id,
|
|
191
197
|
tag: TelemetryDataTag.PackageData,
|
|
@@ -200,7 +206,10 @@ export class RemoteChannelContext implements IChannelContext {
|
|
|
200
206
|
if (factory === undefined) {
|
|
201
207
|
// TODO: dataStoreId may require a different tag from PackageData #7488
|
|
202
208
|
throw new DataCorruptionError("channelFactoryNotRegisteredForGivenType", {
|
|
203
|
-
channelId:
|
|
209
|
+
channelId: {
|
|
210
|
+
value: this.id,
|
|
211
|
+
tag: TelemetryDataTag.PackageData,
|
|
212
|
+
},
|
|
204
213
|
dataStoreId: {
|
|
205
214
|
value: this.dataStoreContext.id,
|
|
206
215
|
tag: TelemetryDataTag.PackageData,
|
|
@@ -217,7 +226,7 @@ export class RemoteChannelContext implements IChannelContext {
|
|
|
217
226
|
this.subLogger.sendTelemetryEvent(
|
|
218
227
|
{
|
|
219
228
|
eventName: "ChannelAttributesVersionMismatch",
|
|
220
|
-
channelType: {value: attributes.type, tag: TelemetryDataTag.PackageData},
|
|
229
|
+
channelType: { value: attributes.type, tag: TelemetryDataTag.PackageData },
|
|
221
230
|
channelSnapshotVersion: {
|
|
222
231
|
value: `${attributes.snapshotFormatVersion}@${attributes.packageVersion}`,
|
|
223
232
|
tag: TelemetryDataTag.PackageData,
|