@fluidframework/container-runtime 2.0.0-internal.1.0.0.83139 → 2.0.0-internal.1.0.1
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/batchTracker.js +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +16 -16
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +1 -38
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +60 -109
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.d.ts +1 -1
- package/dist/dataStore.d.ts.map +1 -1
- package/dist/dataStore.js +2 -3
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStores.d.ts +1 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +2 -2
- package/dist/dataStores.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/runningSummarizer.js +1 -1
- package/dist/runningSummarizer.js.map +1 -1
- package/dist/summarizer.d.ts.map +1 -1
- package/dist/summarizer.js +20 -1
- package/dist/summarizer.js.map +1 -1
- package/dist/summaryGenerator.js +1 -1
- package/dist/summaryGenerator.js.map +1 -1
- package/lib/batchTracker.js +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +16 -16
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +1 -38
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +60 -109
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.d.ts +1 -1
- package/lib/dataStore.d.ts.map +1 -1
- package/lib/dataStore.js +2 -3
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStores.d.ts +1 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +2 -2
- package/lib/dataStores.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/runningSummarizer.js +1 -1
- package/lib/runningSummarizer.js.map +1 -1
- package/lib/summarizer.d.ts.map +1 -1
- package/lib/summarizer.js +22 -3
- package/lib/summarizer.js.map +1 -1
- package/lib/summaryGenerator.js +1 -1
- package/lib/summaryGenerator.js.map +1 -1
- package/package.json +27 -18
- package/src/batchTracker.ts +1 -1
- package/src/blobManager.ts +20 -16
- package/src/containerRuntime.ts +84 -164
- package/src/dataStore.ts +1 -4
- package/src/dataStores.ts +13 -13
- package/src/packageVersion.ts +1 -1
- package/src/runningSummarizer.ts +1 -1
- package/src/summarizer.ts +28 -3
- package/src/summaryGenerator.ts +1 -1
package/src/dataStores.ts
CHANGED
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
ITelemetryContext,
|
|
30
30
|
} from "@fluidframework/runtime-definitions";
|
|
31
31
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
convertSnapshotTreeToSummaryTree,
|
|
33
|
+
convertToSummaryTree,
|
|
34
|
+
create404Response,
|
|
35
|
+
responseToException,
|
|
36
|
+
SummaryTreeBuilder,
|
|
37
37
|
} from "@fluidframework/runtime-utils";
|
|
38
38
|
import { ChildLogger, LoggingError, TelemetryDataTag } from "@fluidframework/telemetry-utils";
|
|
39
39
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
@@ -56,10 +56,10 @@ import { GCNodeType } from "./garbageCollection";
|
|
|
56
56
|
|
|
57
57
|
type PendingAliasResolve = (success: boolean) => void;
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
/**
|
|
60
|
+
* This class encapsulates data store handling. Currently it is only used by the container runtime,
|
|
61
|
+
* but eventually could be hosted on any channel once we formalize the channel api boundary.
|
|
62
|
+
*/
|
|
63
63
|
export class DataStores implements IDisposable {
|
|
64
64
|
// Stores tracked by the Domain
|
|
65
65
|
private readonly pendingAttach = new Map<string, IAttachMessage>();
|
|
@@ -202,7 +202,7 @@ export class DataStores implements IDisposable {
|
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
// If a non-local operation then go and create the object, otherwise mark it as officially attached.
|
|
206
206
|
if (this.alreadyProcessed(attachMessage.id)) {
|
|
207
207
|
// TODO: dataStoreId may require a different tag from PackageData #7488
|
|
208
208
|
const error = new DataCorruptionError(
|
|
@@ -362,7 +362,7 @@ export class DataStores implements IDisposable {
|
|
|
362
362
|
return context;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
public _createFluidDataStoreContext(pkg: string[], id: string,
|
|
365
|
+
public _createFluidDataStoreContext(pkg: string[], id: string, props?: any) {
|
|
366
366
|
assert(!id.includes("/"), 0x30d /* Id cannot contain slashes */);
|
|
367
367
|
const context = new LocalFluidDataStoreContext({
|
|
368
368
|
id,
|
|
@@ -376,7 +376,7 @@ export class DataStores implements IDisposable {
|
|
|
376
376
|
),
|
|
377
377
|
makeLocallyVisibleFn: () => this.makeDataStoreLocallyVisible(id),
|
|
378
378
|
snapshotTree: undefined,
|
|
379
|
-
isRootDataStore:
|
|
379
|
+
isRootDataStore: false,
|
|
380
380
|
writeGCDataAtRoot: this.writeGCDataAtRoot,
|
|
381
381
|
disableIsolatedChannels: this.runtime.disableIsolatedChannels,
|
|
382
382
|
createProps: props,
|
|
@@ -481,7 +481,7 @@ export class DataStores implements IDisposable {
|
|
|
481
481
|
} else {
|
|
482
482
|
eventName = "attached";
|
|
483
483
|
}
|
|
484
|
-
for (const [,context] of this.contexts) {
|
|
484
|
+
for (const [, context] of this.contexts) {
|
|
485
485
|
// Fire only for bounded stores.
|
|
486
486
|
if (!this.contexts.isNotBound(context.id)) {
|
|
487
487
|
context.emit(eventName);
|
package/src/packageVersion.ts
CHANGED
package/src/runningSummarizer.ts
CHANGED
|
@@ -343,7 +343,7 @@ export class RunningSummarizer implements IDisposable {
|
|
|
343
343
|
*/
|
|
344
344
|
public async lockedRefreshSummaryAckAction<T>(action: () => Promise<T>) {
|
|
345
345
|
assert(this.refreshSummaryAckLock === undefined,
|
|
346
|
-
|
|
346
|
+
0x396 /* Refresh Summary Ack - Caller is responsible for checking lock */);
|
|
347
347
|
|
|
348
348
|
const refreshSummaryAckLock = new Deferred<void>();
|
|
349
349
|
this.refreshSummaryAckLock = refreshSummaryAckLock.promise;
|
package/src/summarizer.ts
CHANGED
|
@@ -8,9 +8,15 @@ import { Deferred } from "@fluidframework/common-utils";
|
|
|
8
8
|
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
9
9
|
import { ILoader, LoaderHeader } from "@fluidframework/container-definitions";
|
|
10
10
|
import { UsageError } from "@fluidframework/container-utils";
|
|
11
|
-
import { DriverHeader } from "@fluidframework/driver-definitions";
|
|
11
|
+
import { DriverErrorType, DriverHeader } from "@fluidframework/driver-definitions";
|
|
12
12
|
import { requestFluidObject } from "@fluidframework/runtime-utils";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
ChildLogger,
|
|
15
|
+
IFluidErrorBase,
|
|
16
|
+
isFluidError,
|
|
17
|
+
LoggingError,
|
|
18
|
+
wrapErrorAndLog,
|
|
19
|
+
} from "@fluidframework/telemetry-utils";
|
|
14
20
|
import {
|
|
15
21
|
FluidObject,
|
|
16
22
|
IFluidHandleContext,
|
|
@@ -381,7 +387,26 @@ export class Summarizer extends EventEmitter implements ISummarizer {
|
|
|
381
387
|
summaryAckHandle,
|
|
382
388
|
refSequenceNumber,
|
|
383
389
|
summaryLogger,
|
|
384
|
-
))
|
|
390
|
+
).catch(async (error) => {
|
|
391
|
+
// If the error is 404, so maybe the fetched version no longer exists on server. We just
|
|
392
|
+
// ignore this error in that case, as that means we will have another summaryAck for the
|
|
393
|
+
// latest version with which we will refresh the state. However in case of single commit
|
|
394
|
+
// summary, we might me missing a summary ack, so in that case we are still fine as the
|
|
395
|
+
// code in `submitSummary` function in container runtime, will refresh the latest state
|
|
396
|
+
// by calling `refreshLatestSummaryAckFromServer` and we will be fine.
|
|
397
|
+
if (isFluidError(error)
|
|
398
|
+
&& error.errorType === DriverErrorType.fileNotFoundOrAccessDeniedError) {
|
|
399
|
+
summaryLogger.sendTelemetryEvent({
|
|
400
|
+
eventName: "HandleSummaryAckErrorIgnored",
|
|
401
|
+
referenceSequenceNumber: refSequenceNumber,
|
|
402
|
+
proposalHandle: summaryOpHandle,
|
|
403
|
+
ackHandle: summaryAckHandle,
|
|
404
|
+
}, error);
|
|
405
|
+
} else {
|
|
406
|
+
throw error;
|
|
407
|
+
}
|
|
408
|
+
}),
|
|
409
|
+
);
|
|
385
410
|
} catch (error) {
|
|
386
411
|
summaryLogger.sendErrorEvent({
|
|
387
412
|
eventName: "HandleSummaryAckError",
|
package/src/summaryGenerator.ts
CHANGED
|
@@ -420,7 +420,7 @@ export class SummaryGenerator {
|
|
|
420
420
|
nonRuntimeOpsSinceLastSummary: this.heuristicData.numNonRuntimeOps,
|
|
421
421
|
};
|
|
422
422
|
|
|
423
|
-
default: assert(true,
|
|
423
|
+
default: assert(true, 0x397 /* Unexpected summary stage */);
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
return initialProps;
|