@fluidframework/container-runtime 2.0.0-dev-rc.5.0.0.265721 → 2.0.0-dev-rc.5.0.0.268409
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/api-report/{container-runtime.api.md → container-runtime.alpha.api.md} +13 -482
- package/api-report/container-runtime.beta.api.md +73 -0
- package/api-report/container-runtime.public.api.md +73 -0
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +2 -2
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +3 -3
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +2 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +14 -14
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +2 -2
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +12 -16
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -4
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +4 -3
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/deltaScheduler.d.ts +2 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +0 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +17 -20
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +5 -19
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +1 -10
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -3
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +1 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +1 -34
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +9 -62
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +1 -1
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +1 -2
- package/dist/gc/index.js.map +1 -1
- package/dist/messageTypes.d.ts +1 -1
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +2 -2
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +11 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +13 -2
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +10 -3
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +7 -0
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +4 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +12 -7
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +9 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +10 -1
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +2 -2
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.d.ts +1 -1
- package/dist/opProperties.d.ts.map +1 -1
- package/dist/opProperties.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/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts +2 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +1 -1
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -1
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +3 -4
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +2 -2
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +2 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +16 -16
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +2 -3
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryCollection.d.ts +2 -1
- package/dist/summary/summaryCollection.d.ts.map +1 -1
- package/dist/summary/summaryCollection.js +9 -9
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +2 -2
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +2 -2
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +3 -4
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +2 -2
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +3 -3
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +2 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +2 -2
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +2 -2
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +6 -10
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -4
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +4 -3
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/deltaScheduler.d.ts +2 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +0 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +17 -20
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +6 -20
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +1 -10
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +0 -2
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +1 -34
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +4 -57
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/index.d.ts +1 -1
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +1 -1
- package/lib/gc/index.js.map +1 -1
- package/lib/messageTypes.d.ts +1 -1
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +2 -2
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +11 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +13 -2
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +10 -3
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +7 -0
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +4 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +12 -7
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +9 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +10 -1
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.d.ts +1 -1
- package/lib/opProperties.d.ts.map +1 -1
- package/lib/opProperties.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/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts +2 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +1 -1
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +1 -1
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +1 -2
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +1 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +2 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +14 -14
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +2 -3
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryCollection.d.ts +2 -1
- package/lib/summary/summaryCollection.d.ts.map +1 -1
- package/lib/summary/summaryCollection.js +1 -1
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +2 -2
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +2 -3
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +33 -22
- package/src/batchTracker.ts +1 -1
- package/src/blobManager.ts +4 -4
- package/src/channelCollection.ts +4 -3
- package/src/connectionTelemetry.ts +14 -6
- package/src/containerRuntime.ts +17 -21
- package/src/dataStoreContext.ts +10 -10
- package/src/deltaManagerProxies.ts +7 -5
- package/src/deltaScheduler.ts +2 -1
- package/src/gc/garbageCollection.ts +18 -24
- package/src/gc/gcConfigs.ts +5 -24
- package/src/gc/gcDefinitions.ts +1 -10
- package/src/gc/gcHelpers.ts +1 -1
- package/src/gc/gcSummaryStateTracker.ts +6 -72
- package/src/gc/gcTelemetry.ts +1 -1
- package/src/gc/index.ts +0 -1
- package/src/messageTypes.ts +1 -1
- package/src/opLifecycle/README.md +120 -160
- package/src/opLifecycle/definitions.ts +2 -2
- package/src/opLifecycle/opCompressor.ts +13 -2
- package/src/opLifecycle/opDecompressor.ts +1 -1
- package/src/opLifecycle/opGroupingManager.ts +11 -4
- package/src/opLifecycle/opSplitter.ts +13 -8
- package/src/opLifecycle/outbox.ts +10 -1
- package/src/opLifecycle/remoteMessageProcessor.ts +2 -1
- package/src/opProperties.ts +2 -4
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +1 -1
- package/src/scheduleManager.ts +2 -1
- package/src/summary/images/appTree.png +0 -0
- package/src/summary/images/protocolAndAppTree.png +0 -0
- package/src/summary/images/summaryTree.png +0 -0
- package/src/summary/orderedClientElection.ts +1 -1
- package/src/summary/runningSummarizer.ts +2 -2
- package/src/summary/summarizerClientElection.ts +2 -1
- package/src/summary/summarizerNode/summarizerNode.ts +19 -29
- package/src/summary/summarizerNode/summarizerNodeUtils.ts +2 -1
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +3 -5
- package/src/summary/summarizerTypes.ts +2 -7
- package/src/summary/summaryCollection.ts +2 -2
- package/src/summary/summaryFormat.ts +5 -6
- package/src/summary/summaryFormats.md +160 -0
- package/src/summary/summaryGenerator.ts +2 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { IBatchMessage } from "@fluidframework/container-definitions/internal";
|
|
7
7
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import { ISequencedDocumentMessage } from "@fluidframework/
|
|
9
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
10
10
|
import {
|
|
11
11
|
DataCorruptionError,
|
|
12
12
|
createChildLogger,
|
|
@@ -111,8 +111,10 @@ export class OpSplitter {
|
|
|
111
111
|
* To illustrate, if the input is `[largeOp, emptyOp, emptyOp]`, `largeOp` will be split into `[chunk1, chunk2, chunk3, chunk4]`.
|
|
112
112
|
* `chunk1`, `chunk2` and `chunk3` will be sent individually and `[chunk4, emptyOp, emptyOp]` will be returned.
|
|
113
113
|
*
|
|
114
|
+
* @remarks - A side effect here is that 1 or more chunks are queued immediately for sending in next JS turn.
|
|
115
|
+
*
|
|
114
116
|
* @param batch - the compressed batch which needs to be processed
|
|
115
|
-
* @returns A new adjusted batch which can be sent over the wire
|
|
117
|
+
* @returns A new adjusted batch (last chunk + empty placeholders) which can be sent over the wire
|
|
116
118
|
*/
|
|
117
119
|
public splitFirstBatchMessage(batch: IBatch): IBatch {
|
|
118
120
|
assert(this.isBatchChunkingEnabled, 0x513 /* Chunking needs to be enabled */);
|
|
@@ -203,16 +205,19 @@ export class OpSplitter {
|
|
|
203
205
|
const serializedContent = this.chunkMap.get(clientId)!.join("");
|
|
204
206
|
this.clearPartialChunks(clientId);
|
|
205
207
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
+
// The final/complete message will contain the data from all the chunks.
|
|
209
|
+
// It will have the sequenceNumber of the last chunk
|
|
210
|
+
const completeMessage = { ...message };
|
|
211
|
+
completeMessage.contents =
|
|
212
|
+
serializedContent === "" ? undefined : JSON.parse(serializedContent);
|
|
208
213
|
// back-compat with 1.x builds
|
|
209
214
|
// This is only required / present for non-compressed, chunked ops
|
|
210
215
|
// For compressed ops, we have op grouping enabled, and type of each op is preserved within compressed content.
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
216
|
+
completeMessage.type = (chunkedContent as any).originalType;
|
|
217
|
+
completeMessage.metadata = chunkedContent.originalMetadata;
|
|
218
|
+
completeMessage.compression = chunkedContent.originalCompression;
|
|
214
219
|
return {
|
|
215
|
-
message:
|
|
220
|
+
message: completeMessage,
|
|
216
221
|
isFinalChunk: true,
|
|
217
222
|
};
|
|
218
223
|
}
|
|
@@ -254,7 +254,7 @@ export class Outbox {
|
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
// Did we disconnect?
|
|
257
|
+
// Did we disconnect? (i.e. is shouldSend false?)
|
|
258
258
|
// If so, do nothing, as pending state manager will resubmit it correctly on reconnect.
|
|
259
259
|
// Because flush() is a task that executes async (on clean stack), we can get here in disconnected state.
|
|
260
260
|
if (this.params.shouldSend()) {
|
|
@@ -307,6 +307,15 @@ export class Outbox {
|
|
|
307
307
|
return this.params.opReentrancy() && !this.rebasing;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
+
/**
|
|
311
|
+
* As necessary and enabled, compresses and chunks the given batch.
|
|
312
|
+
*
|
|
313
|
+
* @remarks - If chunking happens, a side effect here is that 1 or more chunks are queued immediately for sending in next JS turn.
|
|
314
|
+
*
|
|
315
|
+
* @param batch - Raw or Grouped batch to consider for compression/chunking
|
|
316
|
+
* @returns Either (A) the original batch, (B) a compressed batch (same length as original),
|
|
317
|
+
* or (C) a batch containing the last chunk (plus empty placeholders from compression if applicable).
|
|
318
|
+
*/
|
|
310
319
|
private compressBatch(batch: IBatch): IBatch {
|
|
311
320
|
if (
|
|
312
321
|
batch.content.length === 0 ||
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ISequencedDocumentMessage
|
|
6
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
7
|
+
import { MessageType } from "@fluidframework/driver-definitions/internal";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
ContainerMessageType,
|
package/src/opProperties.ts
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
ISequencedDocumentSystemMessage,
|
|
9
|
-
} from "@fluidframework/protocol-definitions";
|
|
6
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
7
|
+
import { ISequencedDocumentSystemMessage } from "@fluidframework/driver-definitions/internal";
|
|
10
8
|
|
|
11
9
|
export const opSize = (op: ISequencedDocumentMessage): number => {
|
|
12
10
|
// Some messages may already have string contents,
|
package/src/packageVersion.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
7
7
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert, Lazy } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import { ISequencedDocumentMessage } from "@fluidframework/
|
|
9
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
10
10
|
import {
|
|
11
11
|
ITelemetryLoggerExt,
|
|
12
12
|
DataProcessingError,
|
package/src/scheduleManager.ts
CHANGED
|
@@ -7,8 +7,9 @@ import type { EventEmitter } from "@fluid-internal/client-utils";
|
|
|
7
7
|
import { performance } from "@fluid-internal/client-utils";
|
|
8
8
|
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
9
9
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
10
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
11
|
+
import { IDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
10
12
|
import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
|
|
11
|
-
import { IDocumentMessage, ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
12
13
|
import {
|
|
13
14
|
ITelemetryLoggerExt,
|
|
14
15
|
DataCorruptionError,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -9,7 +9,7 @@ import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
|
9
9
|
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
10
10
|
import { IEvent, IEventProvider, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
11
11
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
12
|
-
import { IClient, IQuorumClients, ISequencedClient } from "@fluidframework/
|
|
12
|
+
import { IClient, IQuorumClients, ISequencedClient } from "@fluidframework/driver-definitions";
|
|
13
13
|
import {
|
|
14
14
|
ITelemetryLoggerExt,
|
|
15
15
|
UsageError,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
7
7
|
import { IDisposable, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert, Deferred, PromiseTimer, delay } from "@fluidframework/core-utils/internal";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
10
|
+
import { DriverErrorTypes, MessageType } from "@fluidframework/driver-definitions/internal";
|
|
11
11
|
import {
|
|
12
12
|
MonitoringContext,
|
|
13
13
|
UsageError,
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
7
7
|
import { IEvent, IEventProvider } from "@fluidframework/core-interfaces";
|
|
8
|
-
import { IClientDetails
|
|
8
|
+
import { IClientDetails } from "@fluidframework/driver-definitions";
|
|
9
|
+
import { MessageType } from "@fluidframework/driver-definitions/internal";
|
|
9
10
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
10
11
|
|
|
11
12
|
import {
|
|
@@ -5,11 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
ISnapshotTree,
|
|
11
|
-
SummaryType,
|
|
12
|
-
} from "@fluidframework/protocol-definitions";
|
|
8
|
+
import { ISequencedDocumentMessage, SummaryType } from "@fluidframework/driver-definitions";
|
|
9
|
+
import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
13
10
|
import {
|
|
14
11
|
IExperimentalIncrementalSummaryContext,
|
|
15
12
|
ITelemetryContext,
|
|
@@ -165,15 +162,6 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
165
162
|
trackState: boolean = true,
|
|
166
163
|
telemetryContext?: ITelemetryContext,
|
|
167
164
|
): Promise<ISummarizeResult> {
|
|
168
|
-
assert(
|
|
169
|
-
this.isSummaryInProgress(),
|
|
170
|
-
0x1a1 /* "summarize should not be called when not tracking the summary" */,
|
|
171
|
-
);
|
|
172
|
-
assert(
|
|
173
|
-
this.wipSummaryLogger !== undefined,
|
|
174
|
-
0x1a2 /* "wipSummaryLogger should have been set in startSummary or ctor" */,
|
|
175
|
-
);
|
|
176
|
-
|
|
177
165
|
// Try to reuse the tree if unchanged
|
|
178
166
|
if (this.canReuseHandle && !fullTree && !this.hasChanged()) {
|
|
179
167
|
const latestSummary = this._latestSummary;
|
|
@@ -196,21 +184,23 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
196
184
|
}
|
|
197
185
|
}
|
|
198
186
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
187
|
+
let incrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;
|
|
188
|
+
if (!fullTree) {
|
|
189
|
+
assert(
|
|
190
|
+
this.wipReferenceSequenceNumber !== undefined,
|
|
191
|
+
0x5df /* Summarize should not be called when not tracking the summary */,
|
|
192
|
+
);
|
|
193
|
+
incrementalSummaryContext =
|
|
194
|
+
this._latestSummary !== undefined
|
|
195
|
+
? {
|
|
196
|
+
summarySequenceNumber: this.wipReferenceSequenceNumber,
|
|
197
|
+
latestSummarySequenceNumber:
|
|
198
|
+
this._latestSummary.referenceSequenceNumber,
|
|
199
|
+
// TODO: remove summaryPath
|
|
200
|
+
summaryPath: this._latestSummary.fullPath.path,
|
|
201
|
+
}
|
|
202
|
+
: undefined;
|
|
203
|
+
}
|
|
214
204
|
|
|
215
205
|
const result = await this.summarizeInternalFn(
|
|
216
206
|
fullTree,
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { SummaryObject } from "@fluidframework/driver-definitions";
|
|
7
|
+
import { ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
7
8
|
import { channelsTreeName } from "@fluidframework/runtime-definitions/internal";
|
|
8
9
|
import { ITelemetryLoggerExt, TelemetryDataTag } from "@fluidframework/telemetry-utils/internal";
|
|
9
10
|
|
|
@@ -76,15 +76,13 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
76
76
|
private referenceUsedRoutes: string[] | undefined;
|
|
77
77
|
|
|
78
78
|
// The base GC details of this node used to initialize the GC state.
|
|
79
|
-
private readonly baseGCDetailsP:
|
|
79
|
+
private readonly baseGCDetailsP: Promise<IGarbageCollectionDetailsBase>;
|
|
80
80
|
|
|
81
81
|
// Keeps track of whether we have loaded the base details to ensure that we only do it once.
|
|
82
82
|
private baseGCDetailsLoaded: boolean = false;
|
|
83
83
|
|
|
84
84
|
// The base GC details for the child nodes. This is passed to child nodes when creating them.
|
|
85
|
-
private readonly childNodesBaseGCDetailsP:
|
|
86
|
-
Map<string, IGarbageCollectionDetailsBase>
|
|
87
|
-
>;
|
|
85
|
+
private readonly childNodesBaseGCDetailsP: Promise<Map<string, IGarbageCollectionDetailsBase>>;
|
|
88
86
|
|
|
89
87
|
private gcData: IGarbageCollectionData | undefined;
|
|
90
88
|
|
|
@@ -515,7 +513,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
515
513
|
* was previously used and became unused (or vice versa), its used state has changed.
|
|
516
514
|
*/
|
|
517
515
|
private hasUsedStateChanged(): boolean {
|
|
518
|
-
// If GC is disabled,
|
|
516
|
+
// If GC is disabled, it should not affect summary state, return false.
|
|
519
517
|
if (this.gcDisabled) {
|
|
520
518
|
return false;
|
|
521
519
|
}
|
|
@@ -10,11 +10,8 @@ import {
|
|
|
10
10
|
ITelemetryBaseProperties,
|
|
11
11
|
ITelemetryBaseLogger,
|
|
12
12
|
} from "@fluidframework/core-interfaces";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
ISequencedDocumentMessage,
|
|
16
|
-
ISummaryTree,
|
|
17
|
-
} from "@fluidframework/protocol-definitions";
|
|
13
|
+
import { ISequencedDocumentMessage, ISummaryTree } from "@fluidframework/driver-definitions";
|
|
14
|
+
import { IDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
18
15
|
import { ISummaryStats } from "@fluidframework/runtime-definitions/internal";
|
|
19
16
|
import {
|
|
20
17
|
ITelemetryLoggerExt,
|
|
@@ -214,8 +211,6 @@ export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "
|
|
|
214
211
|
readonly summaryStats: IGeneratedSummaryStats;
|
|
215
212
|
/** Time it took to generate the summary tree and stats. */
|
|
216
213
|
readonly generateDuration: number;
|
|
217
|
-
/** True if the full tree regeneration with no handle reuse optimizations was forced. */
|
|
218
|
-
readonly forcedFullTree: boolean;
|
|
219
214
|
}
|
|
220
215
|
|
|
221
216
|
/**
|
|
@@ -7,14 +7,14 @@ import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
|
7
7
|
import { IDeltaManager } from "@fluidframework/container-definitions/internal";
|
|
8
8
|
import { IDisposable, IEvent } from "@fluidframework/core-interfaces";
|
|
9
9
|
import { assert, Deferred } from "@fluidframework/core-utils/internal";
|
|
10
|
+
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions";
|
|
10
11
|
import {
|
|
11
12
|
IDocumentMessage,
|
|
12
|
-
ISequencedDocumentMessage,
|
|
13
13
|
ISummaryAck,
|
|
14
14
|
ISummaryContent,
|
|
15
15
|
ISummaryNack,
|
|
16
16
|
MessageType,
|
|
17
|
-
} from "@fluidframework/
|
|
17
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
18
18
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import {
|
|
7
|
+
import { ISequencedDocumentMessage, SummaryType } from "@fluidframework/driver-definitions";
|
|
8
|
+
import {
|
|
9
|
+
IDocumentStorageService,
|
|
10
|
+
ISnapshotTree,
|
|
11
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
8
12
|
import {
|
|
9
13
|
blobHeadersBlobName as blobNameForBlobHeaders,
|
|
10
14
|
readAndParse,
|
|
11
15
|
} from "@fluidframework/driver-utils/internal";
|
|
12
|
-
import {
|
|
13
|
-
ISequencedDocumentMessage,
|
|
14
|
-
ISnapshotTree,
|
|
15
|
-
SummaryType,
|
|
16
|
-
} from "@fluidframework/protocol-definitions";
|
|
17
16
|
import {
|
|
18
17
|
ISummaryTreeWithStats,
|
|
19
18
|
channelsTreeName,
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Summary and snapshot formats
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
- [Introduction](#introduction)
|
|
6
|
+
- [Summary Format](#summary-format)
|
|
7
|
+
- [Snapshot Format](#snapshot-format)
|
|
8
|
+
- [Summary / Snapshot Tree Visualization](#summary--snapshot-tree-visualization)
|
|
9
|
+
- [Protocol Tree](#protocol-tree)
|
|
10
|
+
- [App Tree](#app-tree)
|
|
11
|
+
- [Summary Tree distinction](#summary-tree-distinction)
|
|
12
|
+
|
|
13
|
+
## Introduction
|
|
14
|
+
|
|
15
|
+
This document describes the format of summaries and snapshots. For learning the differences between summaries and snapshots, see the FAQ section [here](https://fluidframework.com/docs/faq/#whats-the-difference-between-a-summary-and-a-snapshot).
|
|
16
|
+
|
|
17
|
+
The goal of this document is to describe the fundamental structure of a summary / snapshot tree as produced by the runtime, to explain the various node types within the tree along with their respective data, and to show the distinctions between a summary tree and a snapshot tree.
|
|
18
|
+
|
|
19
|
+
## Summary Format
|
|
20
|
+
|
|
21
|
+
Summary is uploaded to storage and is the container's state at a point in time. A summary is represented by an `ISummaryTree` which is defined in [this file](../../../../../common/lib/protocol-definitions/src/summary.ts) and has the following basic structure (some optional properties are removed for simplicity):
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
export interface ISummaryTree {
|
|
25
|
+
type: SummaryType.Tree;
|
|
26
|
+
tree: { [path: string]: SummaryObject };
|
|
27
|
+
}
|
|
28
|
+
export type SummaryType =
|
|
29
|
+
| SummaryType.Attachment
|
|
30
|
+
| SummaryType.Blob
|
|
31
|
+
| SummaryType.Handle
|
|
32
|
+
| SummaryType.Tree;
|
|
33
|
+
export type SummaryObject = ISummaryTree | ISummaryBlob | ISummaryHandle | ISummaryAttachment;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Each tree node in a summary tree is represented by the `ISummaryTree` interface above and contains the following:
|
|
37
|
+
|
|
38
|
+
- `type` - `SummaryType.Tree`
|
|
39
|
+
- `tree` - A list of children of the tree node. Each child node has the following format:
|
|
40
|
+
|
|
41
|
+
`<tree name>`: `<SummaryObject>` where `tree name` is the name given to the child node and `SummaryObject` is one of the following:
|
|
42
|
+
|
|
43
|
+
- `ISummaryTree` - A subtree which has the same structure as this node. For example, container runtime will have subtrees for its data store which in turn will have subtrees for its DDSes.
|
|
44
|
+
|
|
45
|
+
- `ISummaryBlob` - A blob that has some content for this node. For example, a DDS's node has a ".attributes" blob for its attributes such as type, snapshot versions, etc. It may have additional blobs for the actual user content in the DDS.
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
export interface ISummaryBlob {
|
|
49
|
+
type: SummaryType.Blob;
|
|
50
|
+
content: string | Uint8Array;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- `ISummaryAttachment` - This is used for attachment blobs that are uploaded to and downloaded from storage directly. The contents of these blobs are not part of the summary. Storage returns an ID after the attachment has been uploaded and this ID is included in the summary attachment. For example, a DDS can upload some of its large content directly to storage and include its ID in the summary.
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
export interface ISummaryAttachment {
|
|
58
|
+
type: SummaryType.Attachment;
|
|
59
|
+
id: string;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- `ISummaryHandle` - A summary handle is used for incremental summaries. If a node hasn't changed since the last successful summary, instead of sending it's entire contents, it can send a "handle" which is a path to its summary tree object in the last summary. For example, if a data store or DDS did not change since the last summary, the runtime will use a handle for the entire data store instead of re-sending the entire subtree. The same concept applies for a summary blob or a summary attachment and the "handleType" should be set according to the type of the node. An example of "handle" that a DDS sends would be something like: "/_dataStoreId_/_ddsId_".
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
export interface ISummaryHandle {
|
|
67
|
+
type: SummaryType.Handle;
|
|
68
|
+
handleType: SummaryTypeNoHandle;
|
|
69
|
+
handle: string;
|
|
70
|
+
}
|
|
71
|
+
export type SummaryTypeNoHandle =
|
|
72
|
+
| SummaryType.Tree
|
|
73
|
+
| SummaryType.Blob
|
|
74
|
+
| SummaryType.Attachment;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Snapshot Format
|
|
78
|
+
|
|
79
|
+
Snapshot is downloaded from the storage (typically on document load) and is the container's state at a point in time. A snapshot is represented by an `ISnapshotTree` which is defined in [this file](../../../../../common/lib/protocol-definitions/src/storage.ts) and has the following basic structure (some optional properties are removed for simplicity):
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
export interface ISnapshotTree {
|
|
83
|
+
blobs: { [path: string]: string };
|
|
84
|
+
trees: { [path: string]: ISnapshotTree };
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Each node in a snapshot tree is represented by the above interface and contains the following:
|
|
89
|
+
|
|
90
|
+
- `blobs` - A list of blobs that have the contents for the node. For example, a DDS's node has a ".attributes" blob for its attributes such as type, snapshot versions, etc. It may have additional blobs for the actual user content in the DDS. Each blob in the list has the following format:
|
|
91
|
+
|
|
92
|
+
`<blob name>`: `<unique blob id>` where `blob name` is the name given to the blob by the node and `unique blob id` is the id that uniquely represents the blob's content in storage.
|
|
93
|
+
|
|
94
|
+
When a node needs the content of a blob, it fetches it from storage by calling `readBlob` and providing the `unique blob id`.
|
|
95
|
+
|
|
96
|
+
> Note: Summary attachments (described in summary format) are also part of this list.
|
|
97
|
+
|
|
98
|
+
- `trees` - A list of subtrees of the node. For example, container runtime will have subtrees for its data store which in turn will have subtrees for its DDSes. Each subtree in the list has the following format:
|
|
99
|
+
|
|
100
|
+
`<tree name>`: `<snapshot tree>` where `tree name` is the name given to the subtree by the node and `snapshot tree` is its content in `ISnapshotTree` format.
|
|
101
|
+
|
|
102
|
+
## Summary / Snapshot Tree Visualization
|
|
103
|
+
|
|
104
|
+
This section shows what a typical summary or snapshot tree in a container looks like. Some key things to note:
|
|
105
|
+
|
|
106
|
+
- The diagrams in this section show some examples of existing blobs / trees that are added at each node and doesn't show an exhaustive list.
|
|
107
|
+
- The blue boxes represent tree nodes.
|
|
108
|
+
- The green boxes represent blobs.
|
|
109
|
+
- The purple boxes represent attachments.
|
|
110
|
+
- The orange boxes represent other nodes - either existing nodes that are not shown or new nodes that may be added in the future. A node can be a tree, blob or attachment.
|
|
111
|
+
|
|
112
|
+
A typical tree uploaded to or downloaded from storage looks like the following:
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
`Protocol tree` - This is the tree named `.protocol` and contains protocol level information for the container. These are used by the container to initialize.
|
|
116
|
+
|
|
117
|
+
`App tree` - This is the tree named `.app` and contains the container's state and data. The subtree under .app is what is generated by the container runtime.
|
|
118
|
+
|
|
119
|
+
### Protocol tree
|
|
120
|
+
|
|
121
|
+
The contents of the protocol tree are:
|
|
122
|
+
|
|
123
|
+
- `attributes blob` - Attributes such as the sequence number the summary was taken at.
|
|
124
|
+
- `quorum members blob` - The members in the quorum at the time summary was taken.
|
|
125
|
+
- `quorum proposals blob` - The quorum proposals at the time summary was taken.
|
|
126
|
+
- `quorum values blob` - The quorum values at the time summary was taken.
|
|
127
|
+
- Other blobs and trees may be added at this level as needed.
|
|
128
|
+
|
|
129
|
+
### App tree
|
|
130
|
+
|
|
131
|
+
This is what the ".app" tree looks like which is generated by the container runtime during summary upload. The same is passed to container runtime during snapshot download:
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
- `Container`: The root represents the container or container runtime node. Its contents are described below:
|
|
135
|
+
|
|
136
|
+
- `.metadata blob` - The container level metadata such as creation time, create version, etc.
|
|
137
|
+
- `.aliases blob` - The list of aliases for data stores and the corresponding internal id.
|
|
138
|
+
- `.idCompressor blob` - The data for the ID compressor.
|
|
139
|
+
- `.blobs tree` - The snapshot for the attachment blobs added by the blob manager. The individual attachment blobs are present as summary attachments (`ISummaryAttachment`).
|
|
140
|
+
- `gc tree` - The snapshot for garbage collection added by the garbage collector.
|
|
141
|
+
- `.channels tree` - The subtrees for all the data stores.
|
|
142
|
+
- There may be other blobs and trees added at this level as needed.
|
|
143
|
+
|
|
144
|
+
- `Data store`: Data store snapshot trees are under ".channels" subtree of container runtime's tree. Its contents are described below:
|
|
145
|
+
|
|
146
|
+
- `.component blob` - The attributes for a data store such as the package name, snapshot version, etc.
|
|
147
|
+
- `.channels tree` - The subtrees for all its DDSs.
|
|
148
|
+
- There may be other blobs and trees added at this level as needed.
|
|
149
|
+
|
|
150
|
+
- `DDS`: DDS snapshot trees are under ".channels" subtree of its parent data store's tree. Its contents are described below:
|
|
151
|
+
- `.attributes blob` - The attributes for a DDS such as the type, snapshot version, etc.
|
|
152
|
+
- `.header blob` - Added by some DDSs and may contains its data. Note that all DDSs may not add this.
|
|
153
|
+
- A DDS may add other blobs and / or trees to represent its data. Basically, a DDS can write its data in any form
|
|
154
|
+
|
|
155
|
+
### Summary tree distinction
|
|
156
|
+
|
|
157
|
+
In the visualization above, a summary tree differs from a snapshot tree in the following way:
|
|
158
|
+
A summary tree supports incremental summaries via summary handles. Any node in the tree that has not changed since the previous successful summary can send a summary handle (`ISummaryHandle`) instead of sending its entire contents in a full summary. The following diagram shows this with an example where certain parts of the summary tree use a summary handle. It is a zoomed in version of the same app tree as above where nodes where summary handles are marked in red:
|
|
159
|
+
|
|
160
|
+

|
|
@@ -11,9 +11,8 @@ import {
|
|
|
11
11
|
IPromiseTimerResult,
|
|
12
12
|
Timer,
|
|
13
13
|
} from "@fluidframework/core-utils/internal";
|
|
14
|
-
import { DriverErrorTypes } from "@fluidframework/driver-definitions/internal";
|
|
14
|
+
import { DriverErrorTypes, MessageType } from "@fluidframework/driver-definitions/internal";
|
|
15
15
|
import { getRetryDelaySecondsFromError } from "@fluidframework/driver-utils/internal";
|
|
16
|
-
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
17
16
|
import {
|
|
18
17
|
isFluidError,
|
|
19
18
|
ITelemetryLoggerExt,
|
|
@@ -347,7 +346,7 @@ export class SummaryGenerator {
|
|
|
347
346
|
* state change of multiple data stores. So, the total number of data stores that are summarized should not
|
|
348
347
|
* exceed the number of ops since last summary + number of data store whose reference state changed.
|
|
349
348
|
*/
|
|
350
|
-
if (!submitSummaryOptions.fullTree
|
|
349
|
+
if (!submitSummaryOptions.fullTree) {
|
|
351
350
|
const { summarizedDataStoreCount, gcStateUpdatedDataStoreCount = 0 } =
|
|
352
351
|
summaryData.summaryStats;
|
|
353
352
|
if (
|