@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.
Files changed (44) hide show
  1. package/container-runtime.test-files.tar +0 -0
  2. package/dist/channelCollection.d.ts.map +1 -1
  3. package/dist/channelCollection.js +10 -2
  4. package/dist/channelCollection.js.map +1 -1
  5. package/dist/containerRuntime.d.ts +0 -2
  6. package/dist/containerRuntime.d.ts.map +1 -1
  7. package/dist/containerRuntime.js +25 -19
  8. package/dist/containerRuntime.js.map +1 -1
  9. package/dist/dataStoreContexts.d.ts.map +1 -1
  10. package/dist/dataStoreContexts.js +14 -6
  11. package/dist/dataStoreContexts.js.map +1 -1
  12. package/dist/opProperties.js +1 -1
  13. package/dist/opProperties.js.map +1 -1
  14. package/dist/packageVersion.d.ts +1 -1
  15. package/dist/packageVersion.d.ts.map +1 -1
  16. package/dist/packageVersion.js +1 -1
  17. package/dist/packageVersion.js.map +1 -1
  18. package/dist/summary/documentSchema.js +2 -2
  19. package/dist/summary/documentSchema.js.map +1 -1
  20. package/lib/channelCollection.d.ts.map +1 -1
  21. package/lib/channelCollection.js +11 -3
  22. package/lib/channelCollection.js.map +1 -1
  23. package/lib/containerRuntime.d.ts +0 -2
  24. package/lib/containerRuntime.d.ts.map +1 -1
  25. package/lib/containerRuntime.js +24 -18
  26. package/lib/containerRuntime.js.map +1 -1
  27. package/lib/dataStoreContexts.d.ts.map +1 -1
  28. package/lib/dataStoreContexts.js +15 -7
  29. package/lib/dataStoreContexts.js.map +1 -1
  30. package/lib/opProperties.js +1 -1
  31. package/lib/opProperties.js.map +1 -1
  32. package/lib/packageVersion.d.ts +1 -1
  33. package/lib/packageVersion.d.ts.map +1 -1
  34. package/lib/packageVersion.js +1 -1
  35. package/lib/packageVersion.js.map +1 -1
  36. package/lib/summary/documentSchema.js +2 -2
  37. package/lib/summary/documentSchema.js.map +1 -1
  38. package/package.json +22 -26
  39. package/src/channelCollection.ts +16 -7
  40. package/src/containerRuntime.ts +25 -19
  41. package/src/dataStoreContexts.ts +20 -7
  42. package/src/opProperties.ts +1 -1
  43. package/src/packageVersion.ts +1 -1
  44. package/src/summary/documentSchema.ts +2 -2
@@ -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: "FluidDataStoreContextDisposeError",
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({ logger: baseLogger });
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
- if (!wait && !deferredContext.isCompleted) {
144
- return undefined;
145
- }
146
-
147
- return deferredContext.promise;
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> {
@@ -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
  };
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.4.0";
9
+ export const pkgVersion = "2.5.0-302463";
@@ -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");