@fluidframework/container-runtime 2.0.0-internal.5.3.2 → 2.0.0-internal.6.0.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 +80 -0
- package/dist/batchTracker.d.ts +2 -1
- package/dist/batchTracker.d.ts.map +1 -1
- package/dist/batchTracker.js +1 -1
- package/dist/batchTracker.js.map +1 -1
- package/dist/blobManager.d.ts +13 -2
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +103 -25
- package/dist/blobManager.js.map +1 -1
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js +12 -4
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +69 -22
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +344 -238
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.js +11 -2
- package/dist/dataStore.js.map +1 -1
- package/dist/dataStoreContext.d.ts +1 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +40 -44
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreContexts.js +1 -1
- package/dist/dataStoreContexts.js.map +1 -1
- package/dist/dataStores.d.ts +21 -5
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +102 -58
- package/dist/dataStores.js.map +1 -1
- package/dist/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/dist/deltaManagerSummarizerProxy.js +2 -0
- package/dist/deltaManagerSummarizerProxy.js.map +1 -1
- package/dist/deltaScheduler.d.ts.map +1 -1
- package/dist/deltaScheduler.js +5 -5
- package/dist/deltaScheduler.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +29 -25
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.js +13 -11
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts +1 -0
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +5 -6
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +4 -6
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +44 -33
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/id-compressor/idCompressor.d.ts +3 -3
- package/dist/id-compressor/idCompressor.d.ts.map +1 -1
- package/dist/id-compressor/idCompressor.js +52 -52
- package/dist/id-compressor/idCompressor.js.map +1 -1
- package/dist/id-compressor/idRange.js +2 -2
- package/dist/id-compressor/idRange.js.map +1 -1
- package/dist/id-compressor/sessionIdNormalizer.js +11 -16
- package/dist/id-compressor/sessionIdNormalizer.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.js +10 -6
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts +2 -2
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +7 -2
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts +2 -2
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +12 -10
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +13 -5
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts +2 -2
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +11 -7
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +6 -5
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +6 -14
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +8 -2
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/opProperties.js +1 -2
- 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.d.ts +6 -3
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +41 -32
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/scheduleManager.d.ts.map +1 -1
- package/dist/scheduleManager.js +15 -11
- package/dist/scheduleManager.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +2 -1
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +18 -19
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +3 -5
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +42 -66
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.js +5 -8
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.js +5 -9
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.js +8 -12
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.d.ts +5 -5
- package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +26 -22
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeUtils.js +2 -4
- package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -3
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +13 -16
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summaryCollection.js +3 -5
- package/dist/summary/summaryCollection.js.map +1 -1
- package/dist/summary/summaryFormat.js +1 -2
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +67 -21
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts +2 -3
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +9 -7
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/batchTracker.d.ts +2 -1
- package/lib/batchTracker.d.ts.map +1 -1
- package/lib/batchTracker.js +2 -2
- package/lib/batchTracker.js.map +1 -1
- package/lib/blobManager.d.ts +13 -2
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +103 -25
- package/lib/blobManager.js.map +1 -1
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js +13 -5
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +69 -22
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +343 -238
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.js +11 -2
- package/lib/dataStore.js.map +1 -1
- package/lib/dataStoreContext.d.ts +1 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +42 -46
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStoreContexts.js +2 -2
- package/lib/dataStoreContexts.js.map +1 -1
- package/lib/dataStores.d.ts +21 -5
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +103 -59
- package/lib/dataStores.js.map +1 -1
- package/lib/deltaManagerSummarizerProxy.d.ts.map +1 -1
- package/lib/deltaManagerSummarizerProxy.js +2 -0
- package/lib/deltaManagerSummarizerProxy.js.map +1 -1
- package/lib/deltaScheduler.d.ts.map +1 -1
- package/lib/deltaScheduler.js +6 -6
- package/lib/deltaScheduler.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +30 -26
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.js +13 -11
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts +1 -0
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +5 -6
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +4 -6
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +45 -34
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/id-compressor/idCompressor.d.ts +3 -3
- package/lib/id-compressor/idCompressor.d.ts.map +1 -1
- package/lib/id-compressor/idCompressor.js +52 -52
- package/lib/id-compressor/idCompressor.js.map +1 -1
- package/lib/id-compressor/idRange.js +2 -2
- package/lib/id-compressor/idRange.js.map +1 -1
- package/lib/id-compressor/sessionIdNormalizer.js +11 -16
- package/lib/id-compressor/sessionIdNormalizer.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.js +10 -6
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts +2 -2
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +8 -3
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts +2 -2
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +13 -11
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +13 -5
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts +2 -2
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +12 -8
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +6 -5
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +7 -15
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +6 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +8 -2
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/opProperties.js +1 -2
- 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.d.ts +6 -3
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +41 -32
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/scheduleManager.d.ts.map +1 -1
- package/lib/scheduleManager.js +16 -12
- package/lib/scheduleManager.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +2 -1
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +19 -20
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +3 -5
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +43 -67
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.js +6 -9
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.js +5 -9
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.js +8 -12
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.d.ts +5 -5
- package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +27 -23
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeUtils.js +2 -4
- package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +4 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +14 -17
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summaryCollection.js +3 -5
- package/lib/summary/summaryCollection.js.map +1 -1
- package/lib/summary/summaryFormat.js +1 -2
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +68 -22
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts +2 -3
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +10 -8
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +30 -18
- package/src/batchTracker.ts +4 -3
- package/src/blobManager.ts +113 -15
- package/src/connectionTelemetry.ts +7 -3
- package/src/containerRuntime.ts +354 -194
- package/src/dataStore.ts +10 -1
- package/src/dataStoreContext.ts +31 -33
- package/src/dataStoreContexts.ts +2 -2
- package/src/dataStores.ts +108 -71
- package/src/deltaManagerSummarizerProxy.ts +2 -0
- package/src/deltaScheduler.ts +6 -10
- package/src/gc/garbageCollection.ts +13 -8
- package/src/gc/gcHelpers.ts +1 -0
- package/src/gc/gcTelemetry.ts +13 -10
- package/src/id-compressor/idCompressor.ts +6 -5
- package/src/index.ts +0 -1
- package/src/opLifecycle/opCompressor.ts +4 -3
- package/src/opLifecycle/opDecompressor.ts +4 -3
- package/src/opLifecycle/opSplitter.ts +4 -3
- package/src/opLifecycle/outbox.ts +13 -25
- package/src/opLifecycle/remoteMessageProcessor.ts +8 -2
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +34 -25
- package/src/scheduleManager.ts +2 -2
- package/src/summary/orderedClientElection.ts +4 -3
- package/src/summary/runningSummarizer.ts +18 -44
- package/src/summary/summarizer.ts +2 -2
- package/src/summary/summarizerNode/summarizerNode.ts +13 -15
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +8 -7
- package/src/summary/summaryGenerator.ts +6 -2
- package/src/summary/summaryManager.ts +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-runtime",
|
|
3
|
-
"version": "2.0.0-internal.
|
|
3
|
+
"version": "2.0.0-internal.6.0.0",
|
|
4
4
|
"description": "Fluid container runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
39
39
|
"@fluidframework/common-utils": "^1.1.1",
|
|
40
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.
|
|
41
|
-
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.
|
|
42
|
-
"@fluidframework/container-utils": ">=2.0.0-internal.
|
|
43
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.
|
|
44
|
-
"@fluidframework/core-utils": ">=2.0.0-internal.
|
|
45
|
-
"@fluidframework/datastore": ">=2.0.0-internal.
|
|
46
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.
|
|
47
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.
|
|
40
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
41
|
+
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
42
|
+
"@fluidframework/container-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
43
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
44
|
+
"@fluidframework/core-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
45
|
+
"@fluidframework/datastore": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
46
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
47
|
+
"@fluidframework/driver-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
48
48
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
49
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.
|
|
50
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.
|
|
51
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-internal.
|
|
49
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
50
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
51
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
52
52
|
"double-ended-queue": "^2.1.0-0",
|
|
53
53
|
"events": "^3.1.0",
|
|
54
54
|
"lz4js": "^0.2.0",
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
"uuid": "^8.3.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.
|
|
59
|
+
"@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
60
60
|
"@fluid-tools/benchmark": "^0.48.0",
|
|
61
61
|
"@fluid-tools/build-cli": "^0.21.0",
|
|
62
|
-
"@fluidframework/build-common": "^
|
|
62
|
+
"@fluidframework/build-common": "^2.0.0",
|
|
63
63
|
"@fluidframework/build-tools": "^0.21.0",
|
|
64
64
|
"@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.5.2.0",
|
|
65
65
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
66
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.
|
|
67
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.
|
|
66
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
67
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.6.0.0 <2.0.0-internal.6.1.0",
|
|
68
68
|
"@microsoft/api-extractor": "^7.34.4",
|
|
69
69
|
"@types/double-ended-queue": "^2.1.0",
|
|
70
70
|
"@types/events": "^3.0.0",
|
|
@@ -86,7 +86,19 @@
|
|
|
86
86
|
"typescript": "~4.5.5"
|
|
87
87
|
},
|
|
88
88
|
"typeValidation": {
|
|
89
|
-
"broken": {
|
|
89
|
+
"broken": {
|
|
90
|
+
"RemovedInterfaceDeclaration_IRootSummaryTreeWithStats": {
|
|
91
|
+
"forwardCompat": false,
|
|
92
|
+
"backCompat": false
|
|
93
|
+
},
|
|
94
|
+
"ClassDeclaration_ContainerRuntime": {
|
|
95
|
+
"forwardCompat": false,
|
|
96
|
+
"backCompat": false
|
|
97
|
+
},
|
|
98
|
+
"InterfaceDeclaration_ISummarizerRuntime": {
|
|
99
|
+
"backCompat": false
|
|
100
|
+
}
|
|
101
|
+
}
|
|
90
102
|
},
|
|
91
103
|
"scripts": {
|
|
92
104
|
"build": "fluid-build . --task build",
|
|
@@ -97,7 +109,7 @@
|
|
|
97
109
|
"build:genver": "gen-version",
|
|
98
110
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
99
111
|
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
|
|
100
|
-
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
|
|
112
|
+
"clean": "rimraf --glob \"dist\" \"lib\" \"*.tsbuildinfo\" \"*.build.log\"",
|
|
101
113
|
"eslint": "eslint --format stylish src",
|
|
102
114
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
103
115
|
"format": "npm run prettier:fix",
|
package/src/batchTracker.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { EventEmitter } from "events";
|
|
7
|
-
import { ITelemetryLoggerExt,
|
|
7
|
+
import { ITelemetryLoggerExt, createChildLogger } from "@fluidframework/telemetry-utils";
|
|
8
8
|
import { assert, performance } from "@fluidframework/common-utils";
|
|
9
9
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
10
|
+
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
10
11
|
|
|
11
12
|
export class BatchTracker {
|
|
12
13
|
private readonly logger: ITelemetryLoggerExt;
|
|
@@ -16,12 +17,12 @@ export class BatchTracker {
|
|
|
16
17
|
|
|
17
18
|
constructor(
|
|
18
19
|
private readonly batchEventEmitter: EventEmitter,
|
|
19
|
-
logger:
|
|
20
|
+
logger: ITelemetryBaseLogger,
|
|
20
21
|
batchLengthThreshold: number,
|
|
21
22
|
batchCountSamplingRate: number,
|
|
22
23
|
dateTimeProvider: () => number = () => performance.now(),
|
|
23
24
|
) {
|
|
24
|
-
this.logger =
|
|
25
|
+
this.logger = createChildLogger({ logger, namespace: "Batching" });
|
|
25
26
|
|
|
26
27
|
this.batchEventEmitter.on("batchBegin", (message: ISequencedDocumentMessage) => {
|
|
27
28
|
this.startBatchSequenceNumber = message.sequenceNumber;
|
package/src/blobManager.ts
CHANGED
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
} from "@fluidframework/container-runtime-definitions";
|
|
31
31
|
import { AttachState, ICriticalContainerError } from "@fluidframework/container-definitions";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
LoggingError,
|
|
34
|
+
createChildMonitoringContext,
|
|
35
35
|
MonitoringContext,
|
|
36
36
|
PerformanceEvent,
|
|
37
37
|
} from "@fluidframework/telemetry-utils";
|
|
@@ -124,7 +124,7 @@ export type IBlobManagerRuntime = Pick<
|
|
|
124
124
|
|
|
125
125
|
// Note that while offline we "submit" an op before uploading the blob, but we always
|
|
126
126
|
// expect blobs to be uploaded before we actually see the op round-trip
|
|
127
|
-
enum PendingBlobStatus {
|
|
127
|
+
export enum PendingBlobStatus {
|
|
128
128
|
OnlinePendingUpload,
|
|
129
129
|
OnlinePendingOp,
|
|
130
130
|
OfflinePendingUpload,
|
|
@@ -138,16 +138,19 @@ interface PendingBlob {
|
|
|
138
138
|
status: PendingBlobStatus;
|
|
139
139
|
storageId?: string;
|
|
140
140
|
handleP: Deferred<BlobHandle>;
|
|
141
|
-
uploadP?: Promise<ICreateBlobResponse>;
|
|
141
|
+
uploadP?: Promise<ICreateBlobResponse | void>;
|
|
142
142
|
uploadTime?: number;
|
|
143
143
|
minTTLInSeconds?: number;
|
|
144
144
|
attached?: boolean;
|
|
145
145
|
acked?: boolean;
|
|
146
|
+
abortSignal?: AbortSignal;
|
|
147
|
+
opsent?: boolean;
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
export interface IPendingBlobs {
|
|
149
151
|
[id: string]: {
|
|
150
152
|
blob: string;
|
|
153
|
+
storageId?: string;
|
|
151
154
|
uploadTime?: number;
|
|
152
155
|
minTTLInSeconds?: number;
|
|
153
156
|
attached?: boolean;
|
|
@@ -232,7 +235,10 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
232
235
|
private readonly closeContainer: (error?: ICriticalContainerError) => void,
|
|
233
236
|
) {
|
|
234
237
|
super();
|
|
235
|
-
this.mc =
|
|
238
|
+
this.mc = createChildMonitoringContext({
|
|
239
|
+
logger: this.runtime.logger,
|
|
240
|
+
namespace: "BlobManager",
|
|
241
|
+
});
|
|
236
242
|
// Read the feature flag that tells whether to throw when a tombstone blob is requested.
|
|
237
243
|
this.throwOnTombstoneLoad =
|
|
238
244
|
this.mc.config.getBoolean(throwOnTombstoneLoadKey) === true &&
|
|
@@ -248,6 +254,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
248
254
|
const blob = stringToBuffer(entry.blob, "base64");
|
|
249
255
|
const attached = entry.attached;
|
|
250
256
|
const acked = entry.acked;
|
|
257
|
+
const storageId = entry.storageId; // entry.storageId = response.id
|
|
251
258
|
if (entry.minTTLInSeconds && entry.uploadTime) {
|
|
252
259
|
const timeLapseSinceLocalUpload = (Date.now() - entry.uploadTime) / 1000;
|
|
253
260
|
// stashed entries with more than half-life in storage will not be reuploaded
|
|
@@ -256,6 +263,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
256
263
|
blob,
|
|
257
264
|
status: PendingBlobStatus.OfflinePendingOp,
|
|
258
265
|
handleP: new Deferred(),
|
|
266
|
+
storageId,
|
|
259
267
|
uploadP: undefined,
|
|
260
268
|
uploadTime: entry.uploadTime,
|
|
261
269
|
minTTLInSeconds: entry.minTTLInSeconds,
|
|
@@ -277,6 +285,11 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
277
285
|
|
|
278
286
|
this.sendBlobAttachOp = (localId: string, blobId?: string) => {
|
|
279
287
|
const pendingEntry = this.pendingBlobs.get(localId);
|
|
288
|
+
assert(
|
|
289
|
+
pendingEntry !== undefined,
|
|
290
|
+
0x725 /* Must have pending blob entry for upcoming op */,
|
|
291
|
+
);
|
|
292
|
+
pendingEntry.opsent = true;
|
|
280
293
|
if (pendingEntry?.uploadTime && pendingEntry?.minTTLInSeconds) {
|
|
281
294
|
const secondsSinceUpload = (Date.now() - pendingEntry.uploadTime) / 1000;
|
|
282
295
|
const expired = pendingEntry.minTTLInSeconds - secondsSinceUpload < 0;
|
|
@@ -317,6 +330,15 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
317
330
|
return this.pendingOfflineUploads.length > 0;
|
|
318
331
|
}
|
|
319
332
|
|
|
333
|
+
public get allBlobsAttached(): boolean {
|
|
334
|
+
for (const [, entry] of this.pendingBlobs) {
|
|
335
|
+
if (entry.attached === false) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
|
|
320
342
|
public get hasPendingBlobs(): boolean {
|
|
321
343
|
return (
|
|
322
344
|
(this.runtime.attachState !== AttachState.Attached && this.redirectTable.size > 0) ||
|
|
@@ -324,6 +346,13 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
324
346
|
);
|
|
325
347
|
}
|
|
326
348
|
|
|
349
|
+
private createAbortError(pending?: PendingBlob) {
|
|
350
|
+
return new LoggingError("uploadBlob aborted", {
|
|
351
|
+
acked: pending?.acked,
|
|
352
|
+
status: pending?.status,
|
|
353
|
+
uploadTime: pending?.uploadTime,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
327
356
|
/**
|
|
328
357
|
* Upload blobs added while offline. This must be completed before connecting and resubmitting ops.
|
|
329
358
|
*/
|
|
@@ -355,6 +384,28 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
355
384
|
}
|
|
356
385
|
}
|
|
357
386
|
|
|
387
|
+
private async shutdownPendingBlobs(): Promise<void> {
|
|
388
|
+
for (const [localId, entry] of this.pendingBlobs) {
|
|
389
|
+
if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
|
|
390
|
+
this.sendBlobAttachOp(localId, entry.storageId);
|
|
391
|
+
entry.status = PendingBlobStatus.OfflinePendingUpload;
|
|
392
|
+
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
393
|
+
} else if (entry.status === PendingBlobStatus.OnlinePendingOp) {
|
|
394
|
+
entry.status = PendingBlobStatus.OfflinePendingOp;
|
|
395
|
+
entry.handleP.resolve(this.getBlobHandle(localId));
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return new Promise<void>((resolve) => {
|
|
399
|
+
if (this.allBlobsAttached) {
|
|
400
|
+
resolve();
|
|
401
|
+
} else {
|
|
402
|
+
this.once("allBlobsAttached", () => {
|
|
403
|
+
resolve();
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
358
409
|
/**
|
|
359
410
|
* Set of actual storage IDs (i.e., IDs that can be requested from storage). This will be empty if the container is
|
|
360
411
|
* detached or there are no (non-pending) attachment blobs in the document
|
|
@@ -421,6 +472,9 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
421
472
|
? () => {
|
|
422
473
|
pending.attached = true;
|
|
423
474
|
this.deletePendingBlobMaybe(id);
|
|
475
|
+
if (this.allBlobsAttached) {
|
|
476
|
+
this.emit("allBlobsAttached");
|
|
477
|
+
}
|
|
424
478
|
}
|
|
425
479
|
: undefined;
|
|
426
480
|
return new BlobHandle(
|
|
@@ -441,7 +495,10 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
441
495
|
return this.getBlobHandle(response.id);
|
|
442
496
|
}
|
|
443
497
|
|
|
444
|
-
public async createBlob(
|
|
498
|
+
public async createBlob(
|
|
499
|
+
blob: ArrayBufferLike,
|
|
500
|
+
signal?: AbortSignal,
|
|
501
|
+
): Promise<IFluidHandle<ArrayBufferLike>> {
|
|
445
502
|
if (this.runtime.attachState === AttachState.Detached) {
|
|
446
503
|
return this.createBlobDetached(blob);
|
|
447
504
|
}
|
|
@@ -455,6 +512,10 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
455
512
|
0x385 /* For clarity and paranoid defense against adding future attachment states */,
|
|
456
513
|
);
|
|
457
514
|
|
|
515
|
+
if (signal?.aborted) {
|
|
516
|
+
throw this.createAbortError();
|
|
517
|
+
}
|
|
518
|
+
|
|
458
519
|
// Create a local ID for the blob. After uploading it to storage and before returning it, a local ID to
|
|
459
520
|
// storage ID mapping is created.
|
|
460
521
|
const localId = uuid();
|
|
@@ -465,13 +526,27 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
465
526
|
uploadP: this.uploadBlob(localId, blob),
|
|
466
527
|
attached: false,
|
|
467
528
|
acked: false,
|
|
529
|
+
abortSignal: signal,
|
|
530
|
+
opsent: false,
|
|
468
531
|
};
|
|
469
532
|
this.pendingBlobs.set(localId, pendingEntry);
|
|
470
533
|
|
|
471
|
-
|
|
534
|
+
const abortListener = () => {
|
|
535
|
+
if (!pendingEntry.acked) {
|
|
536
|
+
pendingEntry.handleP.reject(this.createAbortError(pendingEntry));
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
signal?.addEventListener("abort", abortListener, { once: true });
|
|
540
|
+
|
|
541
|
+
return pendingEntry.handleP.promise.finally(() => {
|
|
542
|
+
signal?.removeEventListener("abort", abortListener);
|
|
543
|
+
});
|
|
472
544
|
}
|
|
473
545
|
|
|
474
|
-
private async uploadBlob(
|
|
546
|
+
private async uploadBlob(
|
|
547
|
+
localId: string,
|
|
548
|
+
blob: ArrayBufferLike,
|
|
549
|
+
): Promise<ICreateBlobResponse | void> {
|
|
475
550
|
return PerformanceEvent.timedExecAsync(
|
|
476
551
|
this.mc.logger,
|
|
477
552
|
{ eventName: "createBlob" },
|
|
@@ -495,17 +570,24 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
495
570
|
if (this.pendingBlobs.has(id)) {
|
|
496
571
|
const entry = this.pendingBlobs.get(id);
|
|
497
572
|
if (entry?.attached && entry?.acked) {
|
|
498
|
-
this.
|
|
499
|
-
if (!this.hasPendingBlobs) {
|
|
500
|
-
this.emit("noPendingBlobs");
|
|
501
|
-
}
|
|
573
|
+
this.deletePendingBlob(id);
|
|
502
574
|
}
|
|
503
575
|
}
|
|
504
576
|
}
|
|
505
577
|
|
|
578
|
+
private deletePendingBlob(id: string) {
|
|
579
|
+
if (this.pendingBlobs.delete(id) && !this.hasPendingBlobs) {
|
|
580
|
+
this.emit("noPendingBlobs");
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
506
584
|
private onUploadResolve(localId: string, response: ICreateBlobResponseWithTTL) {
|
|
507
585
|
const entry = this.pendingBlobs.get(localId);
|
|
508
586
|
assert(entry !== undefined, 0x6c8 /* pending blob entry not found for uploaded blob */);
|
|
587
|
+
if (entry.abortSignal?.aborted === true && !entry.opsent) {
|
|
588
|
+
this.deletePendingBlob(localId);
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
509
591
|
assert(
|
|
510
592
|
entry.status === PendingBlobStatus.OnlinePendingUpload ||
|
|
511
593
|
entry.status === PendingBlobStatus.OfflinePendingUpload,
|
|
@@ -554,9 +636,13 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
554
636
|
return response;
|
|
555
637
|
}
|
|
556
638
|
|
|
557
|
-
private async onUploadReject(localId: string, error) {
|
|
639
|
+
private async onUploadReject(localId: string, error: any) {
|
|
558
640
|
const entry = this.pendingBlobs.get(localId);
|
|
559
641
|
assert(!!entry, 0x387 /* Must have pending blob entry for blob which failed to upload */);
|
|
642
|
+
if (entry.abortSignal?.aborted === true && !entry.opsent) {
|
|
643
|
+
this.deletePendingBlob(localId);
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
560
646
|
if (!this.runtime.connected) {
|
|
561
647
|
if (entry.status === PendingBlobStatus.OnlinePendingUpload) {
|
|
562
648
|
this.transitionToOffline(localId);
|
|
@@ -623,7 +709,7 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
623
709
|
!!pendingEntry?.storageId,
|
|
624
710
|
0x38d /* blob must be uploaded before resubmitting BlobAttach op */,
|
|
625
711
|
);
|
|
626
|
-
return this.sendBlobAttachOp(localId, pendingEntry
|
|
712
|
+
return this.sendBlobAttachOp(localId, pendingEntry?.storageId);
|
|
627
713
|
}
|
|
628
714
|
return this.sendBlobAttachOp(localId, blobId);
|
|
629
715
|
}
|
|
@@ -631,6 +717,14 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
631
717
|
public processBlobAttachOp(message: ISequencedDocumentMessage, local: boolean) {
|
|
632
718
|
const localId = (message.metadata as IBlobMetadata | undefined)?.localId;
|
|
633
719
|
const blobId = (message.metadata as IBlobMetadata | undefined)?.blobId;
|
|
720
|
+
|
|
721
|
+
if (localId) {
|
|
722
|
+
const pendingEntry = this.pendingBlobs.get(localId);
|
|
723
|
+
if (pendingEntry?.abortSignal?.aborted) {
|
|
724
|
+
this.deletePendingBlob(localId);
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
634
728
|
assert(blobId !== undefined, 0x12a /* "Missing blob id on metadata" */);
|
|
635
729
|
|
|
636
730
|
// Set up a mapping from local ID to storage ID. This is crucial since without this the blob cannot be
|
|
@@ -943,11 +1037,15 @@ export class BlobManager extends TypedEventEmitter<IBlobManagerEvents> {
|
|
|
943
1037
|
}
|
|
944
1038
|
}
|
|
945
1039
|
|
|
946
|
-
public getPendingBlobs(): IPendingBlobs {
|
|
1040
|
+
public async getPendingBlobs(waitBlobsToAttach?: boolean): Promise<IPendingBlobs> {
|
|
1041
|
+
if (waitBlobsToAttach) {
|
|
1042
|
+
await this.shutdownPendingBlobs();
|
|
1043
|
+
}
|
|
947
1044
|
const blobs = {};
|
|
948
1045
|
for (const [key, entry] of this.pendingBlobs) {
|
|
949
1046
|
blobs[key] = {
|
|
950
1047
|
blob: bufferToString(entry.blob, "base64"),
|
|
1048
|
+
storageId: entry.storageId,
|
|
951
1049
|
attached: entry.attached,
|
|
952
1050
|
acked: entry.acked,
|
|
953
1051
|
minTTLInSeconds: entry.minTTLInSeconds,
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
ITelemetryLoggerExt,
|
|
8
|
+
createChildLogger,
|
|
9
|
+
formatTick,
|
|
10
|
+
} from "@fluidframework/telemetry-utils";
|
|
7
11
|
import { IDeltaManager } from "@fluidframework/container-definitions";
|
|
8
12
|
import {
|
|
9
13
|
IDocumentMessage,
|
|
@@ -75,7 +79,7 @@ class OpPerfTelemetry {
|
|
|
75
79
|
private readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>,
|
|
76
80
|
logger: ITelemetryLoggerExt,
|
|
77
81
|
) {
|
|
78
|
-
this.logger =
|
|
82
|
+
this.logger = createChildLogger({ logger, namespace: "OpPerf" });
|
|
79
83
|
|
|
80
84
|
this.deltaManager.on("pong", (latency) => this.recordPingTime(latency));
|
|
81
85
|
this.deltaManager.on("submitOp", (message) => this.beforeOpSubmit(message));
|
|
@@ -179,7 +183,7 @@ class OpPerfTelemetry {
|
|
|
179
183
|
ops: this.gap,
|
|
180
184
|
// track time to connect only for first connection.
|
|
181
185
|
timeToConnect: this.firstConnection
|
|
182
|
-
?
|
|
186
|
+
? formatTick(this.connectionStartTime - this.bootTime)
|
|
183
187
|
: undefined,
|
|
184
188
|
firstConnection: this.firstConnection,
|
|
185
189
|
});
|