@fluidframework/container-runtime 2.1.0 → 2.2.0
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/CHANGELOG.md +30 -0
- package/README.md +2 -2
- package/api-report/container-runtime.legacy.alpha.api.md +4 -3
- package/container-runtime.test-files.tar +0 -0
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +9 -0
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +0 -14
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +2 -12
- package/dist/channelCollection.js.map +1 -1
- package/dist/containerRuntime.d.ts +34 -6
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +176 -81
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +9 -18
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +40 -78
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +0 -6
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +23 -66
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +11 -34
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +9 -52
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +3 -23
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +2 -6
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +4 -8
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts +1 -9
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +3 -25
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/gc/index.d.ts +2 -2
- package/dist/gc/index.d.ts.map +1 -1
- package/dist/gc/index.js +2 -7
- package/dist/gc/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/messageTypes.d.ts +6 -5
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/metadata.d.ts +9 -1
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +6 -1
- package/dist/metadata.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +1 -1
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +8 -0
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +34 -2
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +1 -0
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +20 -0
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +34 -15
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +59 -46
- package/dist/opLifecycle/remoteMessageProcessor.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.d.ts +28 -27
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +143 -112
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +5 -1
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -4
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +16 -15
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +9 -0
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +0 -14
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +2 -11
- package/lib/channelCollection.js.map +1 -1
- package/lib/containerRuntime.d.ts +34 -6
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +176 -81
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +9 -18
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +27 -65
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +0 -6
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +25 -68
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +12 -35
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +9 -52
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +2 -22
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +2 -6
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +4 -8
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts +1 -9
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +3 -24
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/gc/index.d.ts +2 -2
- package/lib/gc/index.d.ts.map +1 -1
- package/lib/gc/index.js +2 -2
- package/lib/gc/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/messageTypes.d.ts +6 -5
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/metadata.d.ts +9 -1
- package/lib/metadata.d.ts.map +1 -1
- package/lib/metadata.js +4 -0
- package/lib/metadata.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +1 -1
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +8 -0
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +34 -2
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +1 -0
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +20 -0
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +34 -15
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +59 -46
- package/lib/opLifecycle/remoteMessageProcessor.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.d.ts +28 -27
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +144 -113
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +5 -1
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +3 -4
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +16 -15
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/package.json +22 -31
- package/src/batchTracker.ts +4 -2
- package/src/blobManager/blobManager.ts +9 -0
- package/src/channelCollection.ts +2 -11
- package/src/containerRuntime.ts +211 -109
- package/src/dataStoreContext.ts +29 -93
- package/src/gc/garbageCollection.ts +26 -79
- package/src/gc/gcConfigs.ts +12 -45
- package/src/gc/gcDefinitions.ts +10 -55
- package/src/gc/gcHelpers.ts +10 -8
- package/src/gc/gcSummaryStateTracker.ts +6 -9
- package/src/gc/gcTelemetry.ts +3 -38
- package/src/gc/index.ts +2 -6
- package/src/index.ts +0 -1
- package/src/messageTypes.ts +12 -11
- package/src/metadata.ts +16 -2
- package/src/opLifecycle/index.ts +1 -0
- package/src/opLifecycle/opGroupingManager.ts +42 -3
- package/src/opLifecycle/outbox.ts +30 -0
- package/src/opLifecycle/remoteMessageProcessor.ts +98 -62
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +199 -177
- package/src/summary/README.md +31 -28
- package/src/summary/summarizerNode/summarizerNode.ts +6 -1
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +20 -43
- package/src/summary/summaryFormats.md +25 -22
|
@@ -165,6 +165,11 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
165
165
|
trackState: boolean = true,
|
|
166
166
|
telemetryContext?: ITelemetryContext,
|
|
167
167
|
): Promise<ISummarizeResult> {
|
|
168
|
+
// If trackState is false, call summarize internal directly and don't track any state.
|
|
169
|
+
if (!trackState) {
|
|
170
|
+
return this.summarizeInternalFn(fullTree, trackState, telemetryContext);
|
|
171
|
+
}
|
|
172
|
+
|
|
168
173
|
// Try to reuse the tree if unchanged
|
|
169
174
|
if (this.canReuseHandle && !fullTree && !this.hasChanged()) {
|
|
170
175
|
const latestSummary = this._latestSummary;
|
|
@@ -206,7 +211,7 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
206
211
|
|
|
207
212
|
const result = await this.summarizeInternalFn(
|
|
208
213
|
fullTree,
|
|
209
|
-
|
|
214
|
+
trackState,
|
|
210
215
|
telemetryContext,
|
|
211
216
|
incrementalSummaryContext,
|
|
212
217
|
);
|
|
@@ -6,13 +6,9 @@
|
|
|
6
6
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { assert, LazyPromise } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import {
|
|
9
|
-
IExperimentalIncrementalSummaryContext,
|
|
10
|
-
ITelemetryContext,
|
|
11
9
|
IGarbageCollectionData,
|
|
12
10
|
CreateChildSummarizerNodeParam,
|
|
13
11
|
IGarbageCollectionDetailsBase,
|
|
14
|
-
ISummarizeInternalResult,
|
|
15
|
-
ISummarizeResult,
|
|
16
12
|
ISummarizerNodeConfigWithGC,
|
|
17
13
|
ISummarizerNodeWithGC,
|
|
18
14
|
SummarizeInternalFn,
|
|
@@ -72,6 +68,9 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
72
68
|
// Tracks the work-in-progress used routes during summary.
|
|
73
69
|
private wipSerializedUsedRoutes: string | undefined;
|
|
74
70
|
|
|
71
|
+
// Tracks the work-in-progress used routes of child nodes during summary.
|
|
72
|
+
private wipChildNodesUsedRoutes: Map<string, string[]> | undefined;
|
|
73
|
+
|
|
75
74
|
// This is the last known used routes of this node as seen by the server as part of a summary.
|
|
76
75
|
private referenceUsedRoutes: string[] | undefined;
|
|
77
76
|
|
|
@@ -102,12 +101,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
102
101
|
*/
|
|
103
102
|
public constructor(
|
|
104
103
|
logger: ITelemetryBaseLogger,
|
|
105
|
-
|
|
106
|
-
fullTree: boolean,
|
|
107
|
-
trackState: boolean,
|
|
108
|
-
telemetryContext?: ITelemetryContext,
|
|
109
|
-
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext,
|
|
110
|
-
) => Promise<ISummarizeInternalResult>,
|
|
104
|
+
summarizeInternalFn: SummarizeInternalFn,
|
|
111
105
|
config: ISummarizerNodeConfigWithGC,
|
|
112
106
|
changeSequenceNumber: number,
|
|
113
107
|
/** Undefined means created without summary */
|
|
@@ -120,18 +114,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
120
114
|
) {
|
|
121
115
|
super(
|
|
122
116
|
logger,
|
|
123
|
-
|
|
124
|
-
fullTree: boolean,
|
|
125
|
-
_trackState: boolean,
|
|
126
|
-
telemetryContext?: ITelemetryContext,
|
|
127
|
-
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext,
|
|
128
|
-
) =>
|
|
129
|
-
summarizeFn(
|
|
130
|
-
fullTree,
|
|
131
|
-
true /* trackState */,
|
|
132
|
-
telemetryContext,
|
|
133
|
-
incrementalSummaryContext,
|
|
134
|
-
),
|
|
117
|
+
summarizeInternalFn,
|
|
135
118
|
config,
|
|
136
119
|
changeSequenceNumber,
|
|
137
120
|
latestSummary,
|
|
@@ -182,27 +165,6 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
182
165
|
}
|
|
183
166
|
}
|
|
184
167
|
|
|
185
|
-
public async summarize(
|
|
186
|
-
fullTree: boolean,
|
|
187
|
-
trackState: boolean = true,
|
|
188
|
-
telemetryContext?: ITelemetryContext,
|
|
189
|
-
): Promise<ISummarizeResult> {
|
|
190
|
-
// If GC is not disabled and a summary is in progress, GC should have run and updated the used routes for this
|
|
191
|
-
// summary by calling updateUsedRoutes which sets wipSerializedUsedRoutes.
|
|
192
|
-
if (!this.gcDisabled && this.isSummaryInProgress()) {
|
|
193
|
-
assert(
|
|
194
|
-
this.wipSerializedUsedRoutes !== undefined,
|
|
195
|
-
0x1b1 /* "wip used routes should be set if tracking a summary" */,
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// If trackState is true, get summary from base summarizer node which tracks summary state.
|
|
200
|
-
// If trackState is false, get summary from summarizeInternal.
|
|
201
|
-
return trackState
|
|
202
|
-
? super.summarize(fullTree, true /* trackState */, telemetryContext)
|
|
203
|
-
: this.summarizeFn(fullTree, trackState, telemetryContext);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
168
|
/**
|
|
207
169
|
* Returns the GC data of this node. If nothing has changed since last summary, it tries to reuse the data from
|
|
208
170
|
* the previous summary. Else, it gets new GC data from the underlying Fluid object.
|
|
@@ -338,6 +300,7 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
338
300
|
*/
|
|
339
301
|
public clearSummary() {
|
|
340
302
|
this.wipSerializedUsedRoutes = undefined;
|
|
303
|
+
this.wipChildNodesUsedRoutes = undefined;
|
|
341
304
|
super.clearSummary();
|
|
342
305
|
}
|
|
343
306
|
|
|
@@ -444,6 +407,20 @@ export class SummarizerNodeWithGC extends SummarizerNode implements IRootSummari
|
|
|
444
407
|
protected maybeUpdateChildState(child: SummarizerNodeWithGC, id: string) {
|
|
445
408
|
super.maybeUpdateChildState(child, id);
|
|
446
409
|
|
|
410
|
+
// If GC has run on this node and summarization isn't complete, this.wipSerializedUsedRoutes will be defined.
|
|
411
|
+
// In that case, update the used routes of the child node. This can happen in scenarios where a data store
|
|
412
|
+
// doesn't have any ops but its reference state changed. So, it gets realized during summarize after GC ran
|
|
413
|
+
// so GC would not have run on this node which is fine.
|
|
414
|
+
if (this.wipSerializedUsedRoutes !== undefined) {
|
|
415
|
+
// If the child route used routes are not defined, initialize it now and it can be used for all child nodes
|
|
416
|
+
// created until this summarization process is completed. This is an optimization to unpack the used routes
|
|
417
|
+
// only when needed.
|
|
418
|
+
if (this.wipChildNodesUsedRoutes === undefined) {
|
|
419
|
+
this.wipChildNodesUsedRoutes = unpackChildNodesUsedRoutes(this.usedRoutes);
|
|
420
|
+
}
|
|
421
|
+
child.updateUsedRoutes(this.wipChildNodesUsedRoutes.get(id) ?? [""]);
|
|
422
|
+
}
|
|
423
|
+
|
|
447
424
|
// In case we have pending summaries on the parent, let's initialize it on the child.
|
|
448
425
|
if (child.latestSummary !== undefined) {
|
|
449
426
|
for (const [key, value] of this.pendingSummaries.entries()) {
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
- [Summary / Snapshot Tree Visualization](#summary--snapshot-tree-visualization)
|
|
9
9
|
- [Protocol Tree](#protocol-tree)
|
|
10
10
|
- [App Tree](#app-tree)
|
|
11
|
-
- [Summary
|
|
11
|
+
- [Summary tree distinction - Incremental summaries](#summary-tree-distinction---incremental-summaries)
|
|
12
12
|
|
|
13
13
|
## Introduction
|
|
14
14
|
|
|
15
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
16
|
|
|
17
|
-
The
|
|
17
|
+
The following sections describe the fundamental structure of a summary / snapshot tree as produced by the runtime, explains the various node types within the tree along with their respective data, and shows the distinctions between a summary tree and a snapshot tree.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### Summary Format
|
|
20
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 [
|
|
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 [summary.ts in the protocol-definitions package][summary-protocol] and has the following basic structure (some optional properties are removed for simplicity):
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
24
|
export interface ISummaryTree {
|
|
@@ -62,21 +62,21 @@ Each tree node in a summary tree is represented by the `ISummaryTree` interface
|
|
|
62
62
|
|
|
63
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
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
76
|
|
|
77
|
-
|
|
77
|
+
### Snapshot Format
|
|
78
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 [
|
|
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 [storage.ts in the protocol-definitions package][storage-protocol] and has the following basic structure (some optional properties are removed for simplicity):
|
|
80
80
|
|
|
81
81
|
```typescript
|
|
82
82
|
export interface ISnapshotTree {
|
|
@@ -99,7 +99,7 @@ Each node in a snapshot tree is represented by the above interface and contains
|
|
|
99
99
|
|
|
100
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
101
|
|
|
102
|
-
|
|
102
|
+
### Summary / Snapshot Tree Visualization
|
|
103
103
|
|
|
104
104
|
This section shows what a typical summary or snapshot tree in a container looks like. Some key things to note:
|
|
105
105
|
|
|
@@ -129,7 +129,7 @@ flowchart TD
|
|
|
129
129
|
|
|
130
130
|
`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.
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
#### Protocol tree
|
|
133
133
|
|
|
134
134
|
The contents of the protocol tree are:
|
|
135
135
|
|
|
@@ -139,7 +139,7 @@ The contents of the protocol tree are:
|
|
|
139
139
|
- `quorum values blob` - The quorum values at the time summary was taken.
|
|
140
140
|
- Other blobs and trees may be added at this level as needed.
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
#### App tree
|
|
143
143
|
|
|
144
144
|
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:
|
|
145
145
|
|
|
@@ -172,8 +172,8 @@ flowchart TD
|
|
|
172
172
|
A --> T[.blobs]:::tree
|
|
173
173
|
T --> U["attachment blob 1"]:::attachment
|
|
174
174
|
T --> V["attachment blob N"]:::attachment
|
|
175
|
-
|
|
176
175
|
```
|
|
176
|
+
|
|
177
177
|
- `Container`: The root represents the container or container runtime node. Its contents are described below:
|
|
178
178
|
|
|
179
179
|
- `.metadata blob` - The container level metadata such as creation time, create version, etc.
|
|
@@ -195,7 +195,7 @@ flowchart TD
|
|
|
195
195
|
- `.header blob` - Added by some DDSs and may contains its data. Note that all DDSs may not add this.
|
|
196
196
|
- A DDS may add other blobs and / or trees to represent its data. Basically, a DDS can write its data in any form
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
#### Summary tree distinction - Incremental summaries
|
|
199
199
|
|
|
200
200
|
In the visualization above, a summary tree differs from a snapshot tree in the following way:
|
|
201
201
|
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:
|
|
@@ -219,3 +219,6 @@ flowchart TD
|
|
|
219
219
|
C --> L["data store N"]:::tree
|
|
220
220
|
A --> M["handle: '/gc'"]:::handle
|
|
221
221
|
```
|
|
222
|
+
|
|
223
|
+
[summary-protocol]: /common/lib/protocol-definitions/src/summary.ts
|
|
224
|
+
[storage-protocol]: /common/lib/protocol-definitions/src/storage.ts
|