@fluidframework/container-runtime 2.0.0-internal.5.1.1 → 2.0.0-internal.5.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 +16 -0
- package/dist/containerRuntime.d.ts +16 -0
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +22 -7
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.d.ts +2 -1
- package/dist/dataStoreContexts.d.ts.map +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStores.d.ts +2 -1
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +0 -1
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +2 -1
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +5 -1
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +11 -0
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.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 +2 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +29 -2
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +87 -19
- package/dist/opLifecycle/outbox.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 +8 -3
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +23 -16
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/index.d.ts +1 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.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.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +3 -3
- package/dist/summary/summarizerNode/summarizerNode.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.map +1 -1
- package/dist/summary/summaryFormat.d.ts +1 -0
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +2 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +2 -1
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +16 -0
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +24 -9
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.d.ts +2 -1
- package/lib/dataStoreContexts.d.ts.map +1 -1
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStores.d.ts +2 -1
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +0 -1
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +2 -1
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +5 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +11 -0
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.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 +1 -1
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +29 -2
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +85 -18
- package/lib/opLifecycle/outbox.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 +8 -3
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +23 -16
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/index.d.ts +1 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.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.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +3 -3
- package/lib/summary/summarizerNode/summarizerNode.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.map +1 -1
- package/lib/summary/summaryFormat.d.ts +1 -0
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +2 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +2 -1
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +17 -17
- package/src/containerRuntime.ts +45 -11
- package/src/dataStoreContext.ts +8 -2
- package/src/dataStoreContexts.ts +2 -1
- package/src/dataStores.ts +2 -2
- package/src/gc/gcDefinitions.ts +0 -1
- package/src/index.ts +1 -0
- package/src/opLifecycle/batchManager.ts +9 -1
- package/src/opLifecycle/definitions.ts +11 -0
- package/src/opLifecycle/index.ts +1 -1
- package/src/opLifecycle/outbox.ts +107 -16
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +38 -34
- package/src/summary/index.ts +1 -0
- package/src/summary/runningSummarizer.ts +1 -1
- package/src/summary/summarizerNode/summarizerNode.ts +3 -3
- package/src/summary/summaryCollection.ts +2 -1
- package/src/summary/summaryFormat.ts +5 -1
- package/src/summary/summaryManager.ts +2 -1
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
MonitoringContext,
|
|
11
11
|
} from "@fluidframework/telemetry-utils";
|
|
12
12
|
import { assert } from "@fluidframework/common-utils";
|
|
13
|
-
import { IContainerContext } from "@fluidframework/container-definitions";
|
|
13
|
+
import { IContainerContext, ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
14
14
|
import { GenericError, UsageError } from "@fluidframework/container-utils";
|
|
15
15
|
import { MessageType } from "@fluidframework/protocol-definitions";
|
|
16
16
|
import { ICompressionRuntimeOptions } from "../containerRuntime";
|
|
17
|
-
import { PendingStateManager } from "../pendingStateManager";
|
|
17
|
+
import { IPendingBatchMessage, PendingStateManager } from "../pendingStateManager";
|
|
18
18
|
import {
|
|
19
19
|
BatchManager,
|
|
20
20
|
BatchSequenceNumbers,
|
|
@@ -31,6 +31,7 @@ export interface IOutboxConfig {
|
|
|
31
31
|
// The maximum size of a batch that we can send over the wire.
|
|
32
32
|
readonly maxBatchSizeInBytes: number;
|
|
33
33
|
readonly disablePartialFlush: boolean;
|
|
34
|
+
readonly enableBatchRebasing: boolean;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export interface IOutboxParameters {
|
|
@@ -43,18 +44,40 @@ export interface IOutboxParameters {
|
|
|
43
44
|
readonly logger: ITelemetryLoggerExt;
|
|
44
45
|
readonly groupingManager: OpGroupingManager;
|
|
45
46
|
readonly getCurrentSequenceNumbers: () => BatchSequenceNumbers;
|
|
47
|
+
readonly reSubmit: (message: IPendingBatchMessage) => void;
|
|
48
|
+
readonly opReentrancy: () => boolean;
|
|
49
|
+
readonly closeContainer: (error?: ICriticalContainerError) => void;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Temporarily increase the stack limit while executing the provided action.
|
|
54
|
+
* If a negative value is provided for `length`, no stack frames will be collected.
|
|
55
|
+
* If Infinity is provided, all frames will be collected.
|
|
56
|
+
*
|
|
57
|
+
* ADO:4663 - add this to the common packages.
|
|
58
|
+
*
|
|
59
|
+
* @param action - action which returns an error
|
|
60
|
+
* @param length - number of stack frames to collect, 50 if unspecified.
|
|
61
|
+
* @returns the result of the action provided
|
|
62
|
+
*/
|
|
63
|
+
export function getLongStack<T>(action: () => T, length: number = 50): T {
|
|
64
|
+
const errorObj = Error as any;
|
|
65
|
+
if (
|
|
66
|
+
(
|
|
67
|
+
Object.getOwnPropertyDescriptor(errorObj, "stackTraceLimit") ||
|
|
68
|
+
Object.getOwnPropertyDescriptor(Object.getPrototypeOf(errorObj), "stackTraceLimit") ||
|
|
69
|
+
{}
|
|
70
|
+
).writable !== true
|
|
71
|
+
) {
|
|
72
|
+
return action();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const originalStackTraceLimit = errorObj.stackTraceLimit;
|
|
50
76
|
try {
|
|
51
|
-
|
|
52
|
-
(Error as any).stackTraceLimit = 50;
|
|
53
|
-
const result = action();
|
|
54
|
-
(Error as any).stackTraceLimit = originalStackTraceLimit;
|
|
55
|
-
return result;
|
|
56
|
-
} catch (error) {
|
|
77
|
+
errorObj.stackTraceLimit = length;
|
|
57
78
|
return action();
|
|
79
|
+
} finally {
|
|
80
|
+
errorObj.stackTraceLimit = originalStackTraceLimit;
|
|
58
81
|
}
|
|
59
82
|
}
|
|
60
83
|
|
|
@@ -63,6 +86,8 @@ export class Outbox {
|
|
|
63
86
|
private readonly attachFlowBatch: BatchManager;
|
|
64
87
|
private readonly mainBatch: BatchManager;
|
|
65
88
|
private readonly defaultAttachFlowSoftLimitInBytes = 320 * 1024;
|
|
89
|
+
private batchRebasesToReport = 5;
|
|
90
|
+
private rebasing = false;
|
|
66
91
|
|
|
67
92
|
/**
|
|
68
93
|
* Track the number of ops which were detected to have a mismatched
|
|
@@ -132,7 +157,7 @@ export class Outbox {
|
|
|
132
157
|
}
|
|
133
158
|
|
|
134
159
|
if (!this.params.config.disablePartialFlush) {
|
|
135
|
-
this.
|
|
160
|
+
this.flushAll();
|
|
136
161
|
}
|
|
137
162
|
}
|
|
138
163
|
|
|
@@ -142,6 +167,7 @@ export class Outbox {
|
|
|
142
167
|
if (
|
|
143
168
|
!this.mainBatch.push(
|
|
144
169
|
message,
|
|
170
|
+
this.isContextReentrant(),
|
|
145
171
|
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
146
172
|
)
|
|
147
173
|
) {
|
|
@@ -160,16 +186,18 @@ export class Outbox {
|
|
|
160
186
|
if (
|
|
161
187
|
!this.attachFlowBatch.push(
|
|
162
188
|
message,
|
|
189
|
+
this.isContextReentrant(),
|
|
163
190
|
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
164
191
|
)
|
|
165
192
|
) {
|
|
166
193
|
// BatchManager has two limits - soft limit & hard limit. Soft limit is only engaged
|
|
167
194
|
// when queue is not empty.
|
|
168
195
|
// Flush queue & retry. Failure on retry would mean - single message is bigger than hard limit
|
|
169
|
-
this.flushInternal(this.attachFlowBatch
|
|
196
|
+
this.flushInternal(this.attachFlowBatch);
|
|
170
197
|
if (
|
|
171
198
|
!this.attachFlowBatch.push(
|
|
172
199
|
message,
|
|
200
|
+
this.isContextReentrant(),
|
|
173
201
|
this.params.getCurrentSequenceNumbers().clientSequenceNumber,
|
|
174
202
|
)
|
|
175
203
|
) {
|
|
@@ -191,22 +219,85 @@ export class Outbox {
|
|
|
191
219
|
this.attachFlowBatch.contentSizeInBytes >=
|
|
192
220
|
this.params.config.compressionOptions.minimumBatchSizeInBytes
|
|
193
221
|
) {
|
|
194
|
-
this.flushInternal(this.attachFlowBatch
|
|
222
|
+
this.flushInternal(this.attachFlowBatch);
|
|
195
223
|
}
|
|
196
224
|
}
|
|
197
225
|
|
|
198
226
|
public flush() {
|
|
199
|
-
|
|
200
|
-
|
|
227
|
+
if (this.isContextReentrant()) {
|
|
228
|
+
const error = new UsageError("Flushing is not supported inside DDS event handlers");
|
|
229
|
+
this.params.closeContainer(error);
|
|
230
|
+
throw error;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
this.flushAll();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private flushAll() {
|
|
237
|
+
this.flushInternal(this.attachFlowBatch);
|
|
238
|
+
this.flushInternal(this.mainBatch);
|
|
201
239
|
}
|
|
202
240
|
|
|
203
|
-
private flushInternal(
|
|
241
|
+
private flushInternal(batchManager: BatchManager) {
|
|
242
|
+
if (batchManager.empty) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const rawBatch = batchManager.popBatch();
|
|
247
|
+
if (rawBatch.hasReentrantOps === true && this.params.config.enableBatchRebasing) {
|
|
248
|
+
assert(!this.rebasing, 0x6fa /* A rebased batch should never have reentrant ops */);
|
|
249
|
+
// If a batch contains reentrant ops (ops created as a result from processing another op)
|
|
250
|
+
// it needs to be rebased so that we can ensure consistent reference sequence numbers
|
|
251
|
+
// and eventual consistency at the DDS level.
|
|
252
|
+
this.rebase(rawBatch, batchManager);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
204
256
|
const processedBatch = this.compressBatch(rawBatch);
|
|
205
257
|
this.sendBatch(processedBatch);
|
|
206
258
|
|
|
207
259
|
this.persistBatch(rawBatch.content);
|
|
208
260
|
}
|
|
209
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Rebases a batch. All the ops in the batch are resubmitted to the runtime and
|
|
264
|
+
* they will end up back in the same batch manager they were flushed from and subsequently flushed.
|
|
265
|
+
*
|
|
266
|
+
* @param rawBatch - the batch to be rebased
|
|
267
|
+
*/
|
|
268
|
+
private rebase(rawBatch: IBatch, batchManager: BatchManager) {
|
|
269
|
+
assert(!this.rebasing, 0x6fb /* Reentrancy */);
|
|
270
|
+
|
|
271
|
+
this.rebasing = true;
|
|
272
|
+
for (const message of rawBatch.content) {
|
|
273
|
+
this.params.reSubmit({
|
|
274
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
275
|
+
content: message.contents!,
|
|
276
|
+
localOpMetadata: message.localOpMetadata,
|
|
277
|
+
opMetadata: message.metadata,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (this.batchRebasesToReport > 0) {
|
|
282
|
+
this.mc.logger.sendTelemetryEvent(
|
|
283
|
+
{
|
|
284
|
+
eventName: "BatchRebase",
|
|
285
|
+
length: rawBatch.content.length,
|
|
286
|
+
referenceSequenceNumber: rawBatch.referenceSequenceNumber,
|
|
287
|
+
},
|
|
288
|
+
new UsageError("BatchRebase"),
|
|
289
|
+
);
|
|
290
|
+
this.batchRebasesToReport--;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
this.flushInternal(batchManager);
|
|
294
|
+
this.rebasing = false;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
private isContextReentrant(): boolean {
|
|
298
|
+
return this.params.opReentrancy() && !this.rebasing;
|
|
299
|
+
}
|
|
300
|
+
|
|
210
301
|
private compressBatch(batch: IBatch): IBatch {
|
|
211
302
|
if (
|
|
212
303
|
batch.content.length === 0 ||
|
package/src/packageVersion.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IDisposable } from "@fluidframework/
|
|
6
|
+
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { assert, Lazy } from "@fluidframework/common-utils";
|
|
8
8
|
import { ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
9
9
|
import { DataProcessingError } from "@fluidframework/container-utils";
|
|
@@ -50,17 +50,19 @@ export interface IPendingLocalState {
|
|
|
50
50
|
pendingStates: IPendingState[];
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
export interface IPendingBatchMessage {
|
|
54
|
+
content: string;
|
|
55
|
+
localOpMetadata: unknown;
|
|
56
|
+
opMetadata: Record<string, unknown> | undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
53
59
|
export interface IRuntimeStateHandler {
|
|
54
60
|
connected(): boolean;
|
|
55
61
|
clientId(): string | undefined;
|
|
56
62
|
close(error?: ICriticalContainerError): void;
|
|
57
63
|
applyStashedOp(content: string): Promise<unknown>;
|
|
58
|
-
reSubmit(
|
|
59
|
-
|
|
60
|
-
localOpMetadata: unknown,
|
|
61
|
-
opMetadata: Record<string, unknown> | undefined,
|
|
62
|
-
): void;
|
|
63
|
-
orderSequentially(callback: () => void): void;
|
|
64
|
+
reSubmit(message: IPendingBatchMessage): void;
|
|
65
|
+
reSubmitBatch(batch: IPendingBatchMessage[]): void;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
/**
|
|
@@ -379,35 +381,37 @@ export class PendingStateManager implements IDisposable {
|
|
|
379
381
|
0x554 /* Last pending message cannot be a batch begin */,
|
|
380
382
|
);
|
|
381
383
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
assert(pendingMessagesCount > 0, 0x555 /* No batch end found */);
|
|
395
|
-
|
|
396
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
397
|
-
pendingMessage = this.pendingMessages.shift()!;
|
|
398
|
-
pendingMessagesCount--;
|
|
399
|
-
assert(
|
|
400
|
-
pendingMessage.opMetadata?.batch !== true,
|
|
401
|
-
0x556 /* Batch start needs a corresponding batch end */,
|
|
402
|
-
);
|
|
384
|
+
const batch: IPendingBatchMessage[] = [];
|
|
385
|
+
|
|
386
|
+
// check is >= because batch end may be last pending message
|
|
387
|
+
while (pendingMessagesCount >= 0) {
|
|
388
|
+
batch.push({
|
|
389
|
+
content: pendingMessage.content,
|
|
390
|
+
localOpMetadata: pendingMessage.localOpMetadata,
|
|
391
|
+
opMetadata: pendingMessage.opMetadata,
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
if (pendingMessage.opMetadata?.batch === false) {
|
|
395
|
+
break;
|
|
403
396
|
}
|
|
404
|
-
|
|
397
|
+
assert(pendingMessagesCount > 0, 0x555 /* No batch end found */);
|
|
398
|
+
|
|
399
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
400
|
+
pendingMessage = this.pendingMessages.shift()!;
|
|
401
|
+
pendingMessagesCount--;
|
|
402
|
+
assert(
|
|
403
|
+
pendingMessage.opMetadata?.batch !== true,
|
|
404
|
+
0x556 /* Batch start needs a corresponding batch end */,
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
this.stateHandler.reSubmitBatch(batch);
|
|
405
409
|
} else {
|
|
406
|
-
this.stateHandler.reSubmit(
|
|
407
|
-
pendingMessage.content,
|
|
408
|
-
pendingMessage.localOpMetadata,
|
|
409
|
-
pendingMessage.opMetadata,
|
|
410
|
-
);
|
|
410
|
+
this.stateHandler.reSubmit({
|
|
411
|
+
content: pendingMessage.content,
|
|
412
|
+
localOpMetadata: pendingMessage.localOpMetadata,
|
|
413
|
+
opMetadata: pendingMessage.opMetadata,
|
|
414
|
+
});
|
|
411
415
|
}
|
|
412
416
|
}
|
|
413
417
|
}
|
package/src/summary/index.ts
CHANGED
|
@@ -243,9 +243,9 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
243
243
|
private wasSummarizeMissed(parentSkipRecursion: boolean): boolean {
|
|
244
244
|
assert(
|
|
245
245
|
this.wipSummaryLogger !== undefined,
|
|
246
|
-
|
|
246
|
+
0x6fc /* wipSummaryLogger should have been set in startSummary or ctor */,
|
|
247
247
|
);
|
|
248
|
-
assert(this.wipReferenceSequenceNumber !== undefined,
|
|
248
|
+
assert(this.wipReferenceSequenceNumber !== undefined, 0x6fd /* Not tracking a summary */);
|
|
249
249
|
|
|
250
250
|
// If the parent node skipped recursion, it did not call summarize on this node. So, summarize was not missed
|
|
251
251
|
// but was intentionally not called.
|
|
@@ -335,7 +335,7 @@ export class SummarizerNode implements IRootSummarizerNode {
|
|
|
335
335
|
|
|
336
336
|
// If localPathsToUse is undefined, it means summarize didn't run for this node and in that case the validate
|
|
337
337
|
// step should have failed.
|
|
338
|
-
assert(localPathsToUse !== undefined,
|
|
338
|
+
assert(localPathsToUse !== undefined, 0x6fe /* summarize didn't run for node */);
|
|
339
339
|
const summary = new SummaryNode({
|
|
340
340
|
...localPathsToUse,
|
|
341
341
|
referenceSequenceNumber: this.wipReferenceSequenceNumber,
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { IEvent } from "@fluidframework/common-definitions";
|
|
7
|
+
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
8
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
8
9
|
import { Deferred, assert, TypedEventEmitter } from "@fluidframework/common-utils";
|
|
9
10
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/common-utils";
|
|
7
7
|
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
readAndParse,
|
|
10
|
+
blobHeadersBlobName as blobNameForBlobHeaders,
|
|
11
|
+
} from "@fluidframework/driver-utils";
|
|
9
12
|
import {
|
|
10
13
|
ISequencedDocumentMessage,
|
|
11
14
|
ISnapshotTree,
|
|
@@ -153,6 +156,7 @@ export const chunksBlobName = ".chunks";
|
|
|
153
156
|
export const electedSummarizerBlobName = ".electedSummarizer";
|
|
154
157
|
export const blobsTreeName = ".blobs";
|
|
155
158
|
export const idCompressorBlobName = ".idCompressor";
|
|
159
|
+
export const blobHeadersBlobName = blobNameForBlobHeaders;
|
|
156
160
|
|
|
157
161
|
export function rootHasIsolatedChannels(metadata?: IContainerRuntimeMetadata): boolean {
|
|
158
162
|
return !!metadata && !metadata.disableIsolatedChannels;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { IEvent, IEventProvider } from "@fluidframework/common-definitions";
|
|
7
|
+
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
8
|
import { assert } from "@fluidframework/common-utils";
|
|
8
9
|
import {
|
|
9
10
|
ChildLogger,
|