@fluidframework/container-runtime 2.10.0-307060 → 2.10.0-307399
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/container-runtime.test-files.tar +0 -0
- package/dist/blobManager/blobManager.d.ts +1 -6
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +10 -29
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/containerRuntime.js +1 -1
- package/dist/containerRuntime.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/blobManager/blobManager.d.ts +1 -6
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +11 -30
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/containerRuntime.js +1 -1
- package/lib/containerRuntime.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 +19 -19
- package/src/blobManager/blobManager.ts +24 -39
- package/src/containerRuntime.ts +1 -1
- package/src/packageVersion.ts +1 -1
package/lib/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/container-runtime";
|
|
8
|
-
export declare const pkgVersion = "2.10.0-
|
|
8
|
+
export declare const pkgVersion = "2.10.0-307399";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.10.0-
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.10.0-307399\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.10.0-
|
|
3
|
+
"version": "2.10.0-307399",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -129,18 +129,18 @@
|
|
|
129
129
|
"temp-directory": "nyc/.nyc_output"
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
|
-
"@fluid-internal/client-utils": "2.10.0-
|
|
133
|
-
"@fluidframework/container-definitions": "2.10.0-
|
|
134
|
-
"@fluidframework/container-runtime-definitions": "2.10.0-
|
|
135
|
-
"@fluidframework/core-interfaces": "2.10.0-
|
|
136
|
-
"@fluidframework/core-utils": "2.10.0-
|
|
137
|
-
"@fluidframework/datastore": "2.10.0-
|
|
138
|
-
"@fluidframework/driver-definitions": "2.10.0-
|
|
139
|
-
"@fluidframework/driver-utils": "2.10.0-
|
|
140
|
-
"@fluidframework/id-compressor": "2.10.0-
|
|
141
|
-
"@fluidframework/runtime-definitions": "2.10.0-
|
|
142
|
-
"@fluidframework/runtime-utils": "2.10.0-
|
|
143
|
-
"@fluidframework/telemetry-utils": "2.10.0-
|
|
132
|
+
"@fluid-internal/client-utils": "2.10.0-307399",
|
|
133
|
+
"@fluidframework/container-definitions": "2.10.0-307399",
|
|
134
|
+
"@fluidframework/container-runtime-definitions": "2.10.0-307399",
|
|
135
|
+
"@fluidframework/core-interfaces": "2.10.0-307399",
|
|
136
|
+
"@fluidframework/core-utils": "2.10.0-307399",
|
|
137
|
+
"@fluidframework/datastore": "2.10.0-307399",
|
|
138
|
+
"@fluidframework/driver-definitions": "2.10.0-307399",
|
|
139
|
+
"@fluidframework/driver-utils": "2.10.0-307399",
|
|
140
|
+
"@fluidframework/id-compressor": "2.10.0-307399",
|
|
141
|
+
"@fluidframework/runtime-definitions": "2.10.0-307399",
|
|
142
|
+
"@fluidframework/runtime-utils": "2.10.0-307399",
|
|
143
|
+
"@fluidframework/telemetry-utils": "2.10.0-307399",
|
|
144
144
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
145
145
|
"double-ended-queue": "^2.1.0-0",
|
|
146
146
|
"lz4js": "^0.2.0",
|
|
@@ -149,16 +149,16 @@
|
|
|
149
149
|
"devDependencies": {
|
|
150
150
|
"@arethetypeswrong/cli": "^0.16.4",
|
|
151
151
|
"@biomejs/biome": "~1.9.3",
|
|
152
|
-
"@fluid-internal/mocha-test-setup": "2.10.0-
|
|
153
|
-
"@fluid-private/stochastic-test-utils": "2.10.0-
|
|
154
|
-
"@fluid-private/test-pairwise-generator": "2.10.0-
|
|
152
|
+
"@fluid-internal/mocha-test-setup": "2.10.0-307399",
|
|
153
|
+
"@fluid-private/stochastic-test-utils": "2.10.0-307399",
|
|
154
|
+
"@fluid-private/test-pairwise-generator": "2.10.0-307399",
|
|
155
155
|
"@fluid-tools/benchmark": "^0.50.0",
|
|
156
|
-
"@fluid-tools/build-cli": "^0.
|
|
156
|
+
"@fluid-tools/build-cli": "^0.51.0",
|
|
157
157
|
"@fluidframework/build-common": "^2.0.3",
|
|
158
|
-
"@fluidframework/build-tools": "^0.
|
|
158
|
+
"@fluidframework/build-tools": "^0.51.0",
|
|
159
159
|
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@~2.5.0",
|
|
160
160
|
"@fluidframework/eslint-config-fluid": "^5.4.0",
|
|
161
|
-
"@fluidframework/test-runtime-utils": "2.10.0-
|
|
161
|
+
"@fluidframework/test-runtime-utils": "2.10.0-307399",
|
|
162
162
|
"@microsoft/api-extractor": "7.47.8",
|
|
163
163
|
"@types/double-ended-queue": "^2.1.0",
|
|
164
164
|
"@types/mocha": "^9.1.1",
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
IFluidHandleContext,
|
|
18
18
|
type IFluidHandleInternal,
|
|
19
19
|
} from "@fluidframework/core-interfaces/internal";
|
|
20
|
-
import { assert, Deferred } from "@fluidframework/core-utils/internal";
|
|
20
|
+
import { assert, Deferred, LazyPromise } from "@fluidframework/core-utils/internal";
|
|
21
21
|
import {
|
|
22
22
|
IDocumentStorageService,
|
|
23
23
|
ICreateBlobResponse,
|
|
@@ -181,10 +181,9 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
181
181
|
private readonly runtime: IBlobManagerRuntime;
|
|
182
182
|
private readonly closeContainer: (error?: ICriticalContainerError) => void;
|
|
183
183
|
private readonly localBlobIdGenerator: () => string;
|
|
184
|
-
// TODO: consider to replace with a lazy promise
|
|
185
184
|
private readonly pendingStashedBlobs: Map<string, Promise<ICreateBlobResponse | void>> =
|
|
186
185
|
new Map();
|
|
187
|
-
|
|
186
|
+
public readonly stashedBlobsUploadP: Promise<(void | ICreateBlobResponse)[]>;
|
|
188
187
|
|
|
189
188
|
constructor(props: {
|
|
190
189
|
readonly routeContext: IFluidHandleContext;
|
|
@@ -271,11 +270,18 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
271
270
|
uploadP: this.pendingStashedBlobs.get(localId),
|
|
272
271
|
});
|
|
273
272
|
});
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
.
|
|
277
|
-
this.
|
|
278
|
-
|
|
273
|
+
|
|
274
|
+
this.stashedBlobsUploadP = new LazyPromise(async () =>
|
|
275
|
+
PerformanceEvent.timedExecAsync(
|
|
276
|
+
this.mc.logger,
|
|
277
|
+
{ eventName: "BlobUploadProcessStashedChanges", count: this.pendingStashedBlobs.size },
|
|
278
|
+
async () => Promise.all(this.pendingStashedBlobs.values()),
|
|
279
|
+
{ start: true, end: true },
|
|
280
|
+
),
|
|
281
|
+
).finally(() => {
|
|
282
|
+
this.pendingStashedBlobs.clear();
|
|
283
|
+
});
|
|
284
|
+
|
|
279
285
|
this.sendBlobAttachOp = (localId: string, blobId?: string) => {
|
|
280
286
|
const pendingEntry = this.pendingBlobs.get(localId);
|
|
281
287
|
assert(
|
|
@@ -307,17 +313,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
307
313
|
};
|
|
308
314
|
}
|
|
309
315
|
|
|
310
|
-
public async waitForStashedBlobs(): Promise<(void | ICreateBlobResponse)[]> {
|
|
311
|
-
if (!this.stashedBlobsUploadP) {
|
|
312
|
-
this.stashedBlobsUploadP = Promise.all(this.pendingStashedBlobs.values()).finally(() => {
|
|
313
|
-
this.stashedBlobsUploadP = undefined;
|
|
314
|
-
return;
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
return this.stashedBlobsUploadP;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
316
|
public get allBlobsAttached(): boolean {
|
|
322
317
|
for (const [, entry] of this.pendingBlobs) {
|
|
323
318
|
if (entry.attached === false) {
|
|
@@ -344,26 +339,6 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
344
339
|
public hasPendingStashedUploads(): boolean {
|
|
345
340
|
return Array.from(this.pendingBlobs.values()).some((e) => e.stashedUpload === true);
|
|
346
341
|
}
|
|
347
|
-
/**
|
|
348
|
-
* Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
|
|
349
|
-
*/
|
|
350
|
-
public async trackPendingStashedUploads(): Promise<void> {
|
|
351
|
-
const pendingUploads = Array.from(this.pendingBlobs.values())
|
|
352
|
-
.filter((e) => e.stashedUpload === true)
|
|
353
|
-
.map(async (e) => e.uploadP);
|
|
354
|
-
if (pendingUploads.length === 0) {
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
await PerformanceEvent.timedExecAsync(
|
|
358
|
-
this.mc.logger,
|
|
359
|
-
{
|
|
360
|
-
eventName: "BlobUploadProcessStashedChanges",
|
|
361
|
-
count: pendingUploads.length,
|
|
362
|
-
},
|
|
363
|
-
async () => Promise.all(pendingUploads),
|
|
364
|
-
{ start: true, end: true },
|
|
365
|
-
);
|
|
366
|
-
}
|
|
367
342
|
|
|
368
343
|
public async getBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
369
344
|
// Verify that the blob is not deleted, i.e., it has not been garbage collected. If it is, this will throw
|
|
@@ -552,6 +527,16 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
552
527
|
|
|
553
528
|
private onUploadResolve(localId: string, response: ICreateBlobResponseWithTTL) {
|
|
554
529
|
const entry = this.pendingBlobs.get(localId);
|
|
530
|
+
if (entry === undefined && this.pendingStashedBlobs.has(localId)) {
|
|
531
|
+
// The blob was already processed and deleted. This can happen if the blob was reuploaded by
|
|
532
|
+
// the stashing process and the original upload was processed before the stashed upload.
|
|
533
|
+
this.mc.logger.sendTelemetryEvent({
|
|
534
|
+
eventName: "StashedBlobAlreadyProcessed",
|
|
535
|
+
localId,
|
|
536
|
+
});
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
|
|
555
540
|
assert(entry !== undefined, 0x6c8 /* pending blob entry not found for uploaded blob */);
|
|
556
541
|
if ((entry.abortSignal?.aborted === true && !entry.opsent) || this.stopAttaching) {
|
|
557
542
|
this.mc.logger.sendTelemetryEvent({
|
package/src/containerRuntime.ts
CHANGED
|
@@ -1116,7 +1116,7 @@ export class ContainerRuntime
|
|
|
1116
1116
|
undefined, // summaryConfiguration
|
|
1117
1117
|
);
|
|
1118
1118
|
|
|
1119
|
-
runtime.blobManager.
|
|
1119
|
+
runtime.blobManager.stashedBlobsUploadP.then(
|
|
1120
1120
|
() => {
|
|
1121
1121
|
// make sure we didn't reconnect before the promise resolved
|
|
1122
1122
|
if (runtime.delayConnectClientId !== undefined && !runtime.disposed) {
|
package/src/packageVersion.ts
CHANGED