@fluidframework/container-runtime 2.0.0-dev-rc.2.0.0.245554 → 2.0.0-dev-rc.2.0.0.246488

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 (81) hide show
  1. package/api-report/container-runtime.api.md +3 -2
  2. package/dist/channelCollection.d.ts +1 -0
  3. package/dist/channelCollection.d.ts.map +1 -1
  4. package/dist/channelCollection.js +13 -8
  5. package/dist/channelCollection.js.map +1 -1
  6. package/dist/container-runtime-alpha.d.ts +0 -1
  7. package/dist/container-runtime-beta.d.ts +0 -1
  8. package/dist/container-runtime-public.d.ts +0 -1
  9. package/dist/container-runtime-untrimmed.d.ts +2 -2
  10. package/dist/containerRuntime.d.ts.map +1 -1
  11. package/dist/containerRuntime.js +22 -14
  12. package/dist/containerRuntime.js.map +1 -1
  13. package/dist/dataStoreContext.d.ts +1 -1
  14. package/dist/dataStoreContext.d.ts.map +1 -1
  15. package/dist/dataStoreContext.js.map +1 -1
  16. package/dist/dataStoreRegistry.d.ts +4 -0
  17. package/dist/dataStoreRegistry.d.ts.map +1 -1
  18. package/dist/dataStoreRegistry.js +2 -2
  19. package/dist/dataStoreRegistry.js.map +1 -1
  20. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  21. package/dist/opLifecycle/outbox.js +12 -6
  22. package/dist/opLifecycle/outbox.js.map +1 -1
  23. package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  24. package/dist/opLifecycle/remoteMessageProcessor.js +5 -2
  25. package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
  26. package/dist/packageVersion.d.ts +1 -1
  27. package/dist/packageVersion.js +1 -1
  28. package/dist/packageVersion.js.map +1 -1
  29. package/dist/scheduleManager.d.ts.map +1 -1
  30. package/dist/scheduleManager.js +4 -0
  31. package/dist/scheduleManager.js.map +1 -1
  32. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  33. package/dist/summary/orderedClientElection.js +4 -0
  34. package/dist/summary/orderedClientElection.js.map +1 -1
  35. package/lib/channelCollection.d.ts +1 -0
  36. package/lib/channelCollection.d.ts.map +1 -1
  37. package/lib/channelCollection.js +13 -8
  38. package/lib/channelCollection.js.map +1 -1
  39. package/lib/container-runtime-alpha.d.ts +0 -1
  40. package/lib/container-runtime-beta.d.ts +0 -1
  41. package/lib/container-runtime-public.d.ts +0 -1
  42. package/lib/container-runtime-untrimmed.d.ts +2 -2
  43. package/lib/containerRuntime.d.ts.map +1 -1
  44. package/lib/containerRuntime.js +22 -14
  45. package/lib/containerRuntime.js.map +1 -1
  46. package/lib/dataStoreContext.d.ts +1 -1
  47. package/lib/dataStoreContext.d.ts.map +1 -1
  48. package/lib/dataStoreContext.js.map +1 -1
  49. package/lib/dataStoreRegistry.d.ts +4 -0
  50. package/lib/dataStoreRegistry.d.ts.map +1 -1
  51. package/lib/dataStoreRegistry.js.map +1 -1
  52. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  53. package/lib/opLifecycle/outbox.js +12 -6
  54. package/lib/opLifecycle/outbox.js.map +1 -1
  55. package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
  56. package/lib/opLifecycle/remoteMessageProcessor.js +5 -2
  57. package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
  58. package/lib/packageVersion.d.ts +1 -1
  59. package/lib/packageVersion.js +1 -1
  60. package/lib/packageVersion.js.map +1 -1
  61. package/lib/scheduleManager.d.ts.map +1 -1
  62. package/lib/scheduleManager.js +4 -0
  63. package/lib/scheduleManager.js.map +1 -1
  64. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  65. package/lib/summary/orderedClientElection.js +4 -0
  66. package/lib/summary/orderedClientElection.js.map +1 -1
  67. package/lib/test/dataStoreCreation.spec.js.map +1 -1
  68. package/lib/test/dataStoreRegistry.spec.js.map +1 -1
  69. package/lib/test/fuzz/summarizerFuzzSuite.js.map +1 -1
  70. package/lib/test/opLifecycle/opSplitter.spec.js.map +1 -1
  71. package/lib/test/throttler.spec.js.map +1 -1
  72. package/package.json +16 -16
  73. package/src/channelCollection.ts +15 -9
  74. package/src/containerRuntime.ts +23 -16
  75. package/src/dataStoreContext.ts +1 -1
  76. package/src/dataStoreRegistry.ts +1 -0
  77. package/src/opLifecycle/outbox.ts +14 -7
  78. package/src/opLifecycle/remoteMessageProcessor.ts +6 -2
  79. package/src/packageVersion.ts +1 -1
  80. package/src/scheduleManager.ts +1 -0
  81. package/src/summary/orderedClientElection.ts +1 -0
@@ -17,7 +17,7 @@ import { assert, LazyPromise, unreachableCase } from "@fluidframework/core-utils
17
17
  import { IDocumentStorageService } from "@fluidframework/driver-definitions";
18
18
  import { BlobTreeEntry, readAndParse } from "@fluidframework/driver-utils";
19
19
  import type { IIdCompressor } from "@fluidframework/id-compressor";
20
- import { IEvent } from "@fluidframework/common-definitions";
20
+ import { IEvent } from "@fluidframework/core-interfaces";
21
21
  import {
22
22
  IClientDetails,
23
23
  IDocumentMessage,
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+
5
6
  import { UsageError } from "@fluidframework/telemetry-utils";
6
7
  import {
7
8
  FluidDataStoreRegistryEntry,
@@ -120,7 +120,12 @@ export class Outbox {
120
120
  }
121
121
 
122
122
  public get messageCount(): number {
123
- return this.attachFlowBatch.length + this.mainBatch.length + this.blobAttachBatch.length;
123
+ return (
124
+ this.attachFlowBatch.length +
125
+ this.mainBatch.length +
126
+ this.blobAttachBatch.length +
127
+ this.idAllocationBatch.length
128
+ );
124
129
  }
125
130
 
126
131
  public get isEmpty(): boolean {
@@ -335,8 +340,13 @@ export class Outbox {
335
340
  return;
336
341
  }
337
342
 
338
- const processedBatch = this.compressBatch(rawBatch, disableGroupedBatching);
339
- this.sendBatch(processedBatch);
343
+ // Did we disconnect?
344
+ // If so, do nothing, as pending state manager will resubmit it correctly on reconnect.
345
+ // Because flush() is a task that executes async (on clean stack), we can get here in disconnected state.
346
+ if (this.params.shouldSend()) {
347
+ const processedBatch = this.compressBatch(rawBatch, disableGroupedBatching);
348
+ this.sendBatch(processedBatch);
349
+ }
340
350
 
341
351
  this.persistBatch(rawBatch.content);
342
352
  }
@@ -424,10 +434,7 @@ export class Outbox {
424
434
  */
425
435
  private sendBatch(batch: IBatch) {
426
436
  const length = batch.content.length;
427
-
428
- // Did we disconnect in the middle of turn-based batch?
429
- // If so, do nothing, as pending state manager will resubmit it correctly on reconnect.
430
- if (length === 0 || !this.params.shouldSend()) {
437
+ if (length === 0) {
431
438
  return;
432
439
  }
433
440
 
@@ -66,9 +66,13 @@ export class RemoteMessageProcessor {
66
66
  this.opSplitter.processRemoteMessage(ungroupedMessage2);
67
67
  ungroupedMessage2 = chunkProcessingResult.message;
68
68
 
69
+ // if the splitter is still rebuilding the original message, there is no need to continue processing
70
+ if (chunkProcessingResult.state === "Accepted") {
71
+ continue;
72
+ }
73
+
74
+ // If the message is not chunked there is no need to continue processing
69
75
  if (chunkProcessingResult.state !== "Processed") {
70
- // If the message is not chunked or if the splitter is still rebuilding the original message,
71
- // there is no need to continue processing
72
76
  result.push(
73
77
  ungroupedMessage2 as InboundSequencedContainerRuntimeMessageOrSystemMessage,
74
78
  );
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-dev-rc.2.0.0.245554";
9
+ export const pkgVersion = "2.0.0-dev-rc.2.0.0.246488";
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+
5
6
  import { IDeltaManager } from "@fluidframework/container-definitions";
6
7
  import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
7
8
  import {
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+
5
6
  /* eslint-disable @rushstack/no-new-null */
6
7
  import { IEvent, IEventProvider, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
7
8
  import {