@fluidframework/container-runtime 2.4.0 → 2.5.0-302463
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/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +10 -2
- package/dist/channelCollection.js.map +1 -1
- package/dist/containerRuntime.d.ts +0 -2
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +25 -19
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js +14 -6
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/opProperties.js +1 -1
- package/dist/opProperties.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/summary/documentSchema.js +2 -2
- package/dist/summary/documentSchema.js.map +1 -1
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +11 -3
- package/lib/channelCollection.js.map +1 -1
- package/lib/containerRuntime.d.ts +0 -2
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +24 -18
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js +15 -7
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/opProperties.js +1 -1
- package/lib/opProperties.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/summary/documentSchema.js +2 -2
- package/lib/summary/documentSchema.js.map +1 -1
- package/package.json +22 -26
- package/src/channelCollection.ts +16 -7
- package/src/containerRuntime.ts +25 -19
- package/src/dataStoreContexts.ts +20 -7
- package/src/opProperties.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/summary/documentSchema.ts +2 -2
package/src/dataStoreContexts.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IDisposable, ITelemetryBaseLogger } from "@fluidframework/core-interfac
|
|
|
7
7
|
import { assert, Deferred, Lazy } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import {
|
|
9
9
|
ITelemetryLoggerExt,
|
|
10
|
+
PerformanceEvent,
|
|
10
11
|
createChildLogger,
|
|
11
12
|
} from "@fluidframework/telemetry-utils/internal";
|
|
12
13
|
|
|
@@ -40,7 +41,7 @@ export class DataStoreContexts
|
|
|
40
41
|
.catch((contextError) => {
|
|
41
42
|
this._logger.sendErrorEvent(
|
|
42
43
|
{
|
|
43
|
-
eventName: "
|
|
44
|
+
eventName: "DisposeError",
|
|
44
45
|
fluidDataStoreId,
|
|
45
46
|
},
|
|
46
47
|
contextError,
|
|
@@ -52,7 +53,10 @@ export class DataStoreContexts
|
|
|
52
53
|
private readonly _logger: ITelemetryLoggerExt;
|
|
53
54
|
|
|
54
55
|
constructor(baseLogger: ITelemetryBaseLogger) {
|
|
55
|
-
this._logger = createChildLogger({
|
|
56
|
+
this._logger = createChildLogger({
|
|
57
|
+
namespace: "FluidDataStoreContexts",
|
|
58
|
+
logger: baseLogger,
|
|
59
|
+
});
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
[Symbol.iterator](): Iterator<[string, FluidDataStoreContext]> {
|
|
@@ -140,11 +144,20 @@ export class DataStoreContexts
|
|
|
140
144
|
): Promise<FluidDataStoreContext | undefined> {
|
|
141
145
|
const deferredContext = this.ensureDeferred(id);
|
|
142
146
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
const existing = deferredContext.isCompleted;
|
|
148
|
+
return PerformanceEvent.timedExecAsync(
|
|
149
|
+
this._logger,
|
|
150
|
+
{
|
|
151
|
+
eventName: "GetBoundOrRemoted",
|
|
152
|
+
wait,
|
|
153
|
+
existing,
|
|
154
|
+
},
|
|
155
|
+
async () => (!wait && !existing ? undefined : deferredContext.promise),
|
|
156
|
+
{
|
|
157
|
+
start: true,
|
|
158
|
+
end: true,
|
|
159
|
+
},
|
|
160
|
+
);
|
|
148
161
|
}
|
|
149
162
|
|
|
150
163
|
private ensureDeferred(id: string): Deferred<FluidDataStoreContext> {
|
package/src/opProperties.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const opSize = (op: ISequencedDocumentMessage): number => {
|
|
|
12
12
|
// Some messages may already have string contents,
|
|
13
13
|
// so stringifying them again will add inaccurate overhead.
|
|
14
14
|
const content =
|
|
15
|
-
typeof op.contents === "string" ? op.contents : JSON.stringify(op.contents) ?? "";
|
|
15
|
+
typeof op.contents === "string" ? op.contents : (JSON.stringify(op.contents) ?? "");
|
|
16
16
|
const data = opHasData(op) ? op.data : "";
|
|
17
17
|
return content.length + data.length;
|
|
18
18
|
};
|
package/src/packageVersion.ts
CHANGED
|
@@ -489,7 +489,7 @@ export class DocumentsSchemaController {
|
|
|
489
489
|
// Latter is importnat sure that's what will go into summary.
|
|
490
490
|
this.documentSchema = !existing
|
|
491
491
|
? this.desiredSchema
|
|
492
|
-
: (documentMetadataSchema as IDocumentSchemaCurrent) ??
|
|
492
|
+
: ((documentMetadataSchema as IDocumentSchemaCurrent) ??
|
|
493
493
|
({
|
|
494
494
|
version: currentDocumentVersionSchema,
|
|
495
495
|
// see comment in summarizeDocumentSchema() on why it has to stay zero
|
|
@@ -499,7 +499,7 @@ export class DocumentsSchemaController {
|
|
|
499
499
|
runtime: {
|
|
500
500
|
explicitSchemaControl: boolToProp(!existing && features.explicitSchemaControl),
|
|
501
501
|
},
|
|
502
|
-
} satisfies IDocumentSchemaCurrent);
|
|
502
|
+
} satisfies IDocumentSchemaCurrent));
|
|
503
503
|
|
|
504
504
|
checkRuntimeCompatibility(this.documentSchema, "document");
|
|
505
505
|
this.validateSeqNumber(this.documentSchema.refSeq, snapshotSequenceNumber, "summary");
|