@fluidframework/container-loader 2.0.0-dev-rc.3.0.0.250606 → 2.0.0-dev-rc.3.0.0.253463
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-loader.api.md +11 -11
- package/dist/attachment.d.ts +2 -2
- package/dist/attachment.d.ts.map +1 -1
- package/dist/attachment.js +3 -3
- package/dist/attachment.js.map +1 -1
- package/dist/audience.d.ts +1 -1
- package/dist/audience.d.ts.map +1 -1
- package/dist/audience.js +2 -2
- package/dist/audience.js.map +1 -1
- package/dist/catchUpMonitor.js +2 -2
- package/dist/catchUpMonitor.js.map +1 -1
- package/dist/connectionManager.d.ts +1 -1
- package/dist/connectionManager.d.ts.map +1 -1
- package/dist/connectionManager.js +41 -41
- package/dist/connectionManager.js.map +1 -1
- package/dist/connectionStateHandler.d.ts.map +1 -1
- package/dist/connectionStateHandler.js +27 -27
- package/dist/connectionStateHandler.js.map +1 -1
- package/dist/container-loader-alpha.d.ts +11 -11
- package/dist/container-loader-beta.d.ts +11 -11
- package/dist/container-loader-public.d.ts +11 -11
- package/dist/container-loader-untrimmed.d.ts +11 -11
- package/dist/container.d.ts +5 -3
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +74 -73
- package/dist/container.js.map +1 -1
- package/dist/containerContext.d.ts +5 -3
- package/dist/containerContext.d.ts.map +1 -1
- package/dist/containerContext.js.map +1 -1
- package/dist/containerStorageAdapter.d.ts +2 -2
- package/dist/containerStorageAdapter.d.ts.map +1 -1
- package/dist/containerStorageAdapter.js +6 -6
- package/dist/containerStorageAdapter.js.map +1 -1
- package/dist/contracts.d.ts +3 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +2 -2
- package/dist/contracts.js.map +1 -1
- package/dist/debugLogger.d.ts +2 -1
- package/dist/debugLogger.d.ts.map +1 -1
- package/dist/debugLogger.js +4 -4
- package/dist/debugLogger.js.map +1 -1
- package/dist/deltaManager.d.ts +3 -2
- package/dist/deltaManager.d.ts.map +1 -1
- package/dist/deltaManager.js +44 -44
- package/dist/deltaManager.js.map +1 -1
- package/dist/deltaQueue.js +5 -5
- package/dist/deltaQueue.js.map +1 -1
- package/dist/error.d.ts +3 -2
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +5 -5
- package/dist/error.js.map +1 -1
- package/dist/loader.d.ts +2 -2
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +21 -21
- package/dist/loader.js.map +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.js +2 -2
- package/dist/location-redirection-utilities/resolveWithLocationRedirection.js.map +1 -1
- package/dist/noopHeuristic.js +6 -6
- package/dist/noopHeuristic.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/protocol.d.ts +1 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +2 -2
- package/dist/protocol.js.map +1 -1
- package/dist/protocolTreeDocumentStorageService.d.ts +4 -4
- package/dist/protocolTreeDocumentStorageService.d.ts.map +1 -1
- package/dist/protocolTreeDocumentStorageService.js.map +1 -1
- package/dist/quorum.d.ts +1 -1
- package/dist/quorum.d.ts.map +1 -1
- package/dist/quorum.js.map +1 -1
- package/dist/retriableDocumentStorageService.d.ts +1 -1
- package/dist/retriableDocumentStorageService.d.ts.map +1 -1
- package/dist/retriableDocumentStorageService.js +7 -7
- package/dist/retriableDocumentStorageService.js.map +1 -1
- package/dist/serializedStateManager.d.ts +40 -8
- package/dist/serializedStateManager.d.ts.map +1 -1
- package/dist/serializedStateManager.js +113 -20
- package/dist/serializedStateManager.js.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +14 -14
- package/dist/utils.js.map +1 -1
- package/lib/attachment.d.ts +2 -2
- package/lib/attachment.d.ts.map +1 -1
- package/lib/attachment.js +1 -1
- package/lib/attachment.js.map +1 -1
- package/lib/audience.d.ts +1 -1
- package/lib/audience.d.ts.map +1 -1
- package/lib/audience.js +1 -1
- package/lib/audience.js.map +1 -1
- package/lib/catchUpMonitor.js +1 -1
- package/lib/catchUpMonitor.js.map +1 -1
- package/lib/connectionManager.d.ts +1 -1
- package/lib/connectionManager.d.ts.map +1 -1
- package/lib/connectionManager.js +4 -4
- package/lib/connectionManager.js.map +1 -1
- package/lib/connectionStateHandler.d.ts.map +1 -1
- package/lib/connectionStateHandler.js +2 -2
- package/lib/connectionStateHandler.js.map +1 -1
- package/lib/container-loader-alpha.d.ts +11 -11
- package/lib/container-loader-beta.d.ts +11 -11
- package/lib/container-loader-public.d.ts +11 -11
- package/lib/container-loader-untrimmed.d.ts +11 -11
- package/lib/container.d.ts +5 -3
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +5 -4
- package/lib/container.js.map +1 -1
- package/lib/containerContext.d.ts +5 -3
- package/lib/containerContext.d.ts.map +1 -1
- package/lib/containerContext.js.map +1 -1
- package/lib/containerStorageAdapter.d.ts +2 -2
- package/lib/containerStorageAdapter.d.ts.map +1 -1
- package/lib/containerStorageAdapter.js +2 -2
- package/lib/containerStorageAdapter.js.map +1 -1
- package/lib/contracts.d.ts +3 -2
- package/lib/contracts.d.ts.map +1 -1
- package/lib/contracts.js +1 -1
- package/lib/contracts.js.map +1 -1
- package/lib/debugLogger.d.ts +2 -1
- package/lib/debugLogger.d.ts.map +1 -1
- package/lib/debugLogger.js +1 -1
- package/lib/debugLogger.js.map +1 -1
- package/lib/deltaManager.d.ts +3 -2
- package/lib/deltaManager.d.ts.map +1 -1
- package/lib/deltaManager.js +4 -4
- package/lib/deltaManager.js.map +1 -1
- package/lib/deltaQueue.js +1 -1
- package/lib/deltaQueue.js.map +1 -1
- package/lib/error.d.ts +3 -2
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +2 -2
- package/lib/error.js.map +1 -1
- package/lib/loader.d.ts +2 -2
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +2 -2
- package/lib/loader.js.map +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.d.ts.map +1 -1
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.js +2 -2
- package/lib/location-redirection-utilities/resolveWithLocationRedirection.js.map +1 -1
- package/lib/noopHeuristic.js +2 -2
- package/lib/noopHeuristic.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/protocol.d.ts +1 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -1
- package/lib/protocol.js.map +1 -1
- package/lib/protocolTreeDocumentStorageService.d.ts +4 -4
- package/lib/protocolTreeDocumentStorageService.d.ts.map +1 -1
- package/lib/protocolTreeDocumentStorageService.js.map +1 -1
- package/lib/quorum.d.ts +1 -1
- package/lib/quorum.d.ts.map +1 -1
- package/lib/quorum.js.map +1 -1
- package/lib/retriableDocumentStorageService.d.ts +1 -1
- package/lib/retriableDocumentStorageService.d.ts.map +1 -1
- package/lib/retriableDocumentStorageService.js +3 -3
- package/lib/retriableDocumentStorageService.js.map +1 -1
- package/lib/serializedStateManager.d.ts +40 -8
- package/lib/serializedStateManager.d.ts.map +1 -1
- package/lib/serializedStateManager.js +107 -15
- package/lib/serializedStateManager.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/utils.d.ts +2 -2
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +3 -3
- package/lib/utils.js.map +1 -1
- package/package.json +13 -25
- package/src/attachment.ts +4 -3
- package/src/audience.ts +2 -2
- package/src/catchUpMonitor.ts +1 -1
- package/src/connectionManager.ts +7 -7
- package/src/connectionStateHandler.ts +4 -4
- package/src/container.ts +14 -12
- package/src/containerContext.ts +8 -5
- package/src/containerStorageAdapter.ts +5 -4
- package/src/contracts.ts +2 -3
- package/src/debugLogger.ts +2 -3
- package/src/deltaManager.ts +14 -8
- package/src/deltaQueue.ts +1 -1
- package/src/error.ts +5 -4
- package/src/loader.ts +5 -4
- package/src/location-redirection-utilities/resolveWithLocationRedirection.ts +3 -3
- package/src/noopHeuristic.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/protocol.ts +2 -2
- package/src/protocolTreeDocumentStorageService.ts +4 -1
- package/src/quorum.ts +1 -1
- package/src/retriableDocumentStorageService.ts +5 -4
- package/src/serializedStateManager.ts +167 -18
- package/src/utils.ts +6 -4
- package/lib/test/attachment.spec.js +0 -380
- package/lib/test/attachment.spec.js.map +0 -1
- package/lib/test/catchUpMonitor.spec.js +0 -88
- package/lib/test/catchUpMonitor.spec.js.map +0 -1
- package/lib/test/connectionManager.spec.js +0 -201
- package/lib/test/connectionManager.spec.js.map +0 -1
- package/lib/test/connectionStateHandler.spec.js +0 -555
- package/lib/test/connectionStateHandler.spec.js.map +0 -1
- package/lib/test/container.spec.js +0 -64
- package/lib/test/container.spec.js.map +0 -1
- package/lib/test/deltaManager.spec.js +0 -405
- package/lib/test/deltaManager.spec.js.map +0 -1
- package/lib/test/loader.spec.js +0 -212
- package/lib/test/loader.spec.js.map +0 -1
- package/lib/test/locationRedirectionTests.spec.js +0 -44
- package/lib/test/locationRedirectionTests.spec.js.map +0 -1
- package/lib/test/serializedStateManager.spec.js +0 -151
- package/lib/test/serializedStateManager.spec.js.map +0 -1
- package/lib/test/snapshotConversionTest.spec.js +0 -79
- package/lib/test/snapshotConversionTest.spec.js.map +0 -1
- package/lib/test/types/validateContainerLoaderPrevious.generated.js +0 -38
- package/lib/test/types/validateContainerLoaderPrevious.generated.js.map +0 -1
- package/lib/test/utils.spec.js +0 -96
- package/lib/test/utils.spec.js.map +0 -1
package/src/container.ts
CHANGED
|
@@ -6,15 +6,18 @@
|
|
|
6
6
|
import { TypedEventEmitter, performance } from "@fluid-internal/client-utils";
|
|
7
7
|
import {
|
|
8
8
|
AttachState,
|
|
9
|
-
ContainerWarning,
|
|
10
9
|
IAudience,
|
|
10
|
+
ICriticalContainerError,
|
|
11
|
+
IDeltaManager,
|
|
12
|
+
ReadOnlyInfo,
|
|
13
|
+
} from "@fluidframework/container-definitions";
|
|
14
|
+
import {
|
|
15
|
+
ContainerWarning,
|
|
11
16
|
IBatchMessage,
|
|
12
17
|
ICodeDetailsLoader,
|
|
13
18
|
IContainer,
|
|
14
19
|
IContainerEvents,
|
|
15
20
|
IContainerLoadMode,
|
|
16
|
-
ICriticalContainerError,
|
|
17
|
-
IDeltaManager,
|
|
18
21
|
IFluidCodeDetails,
|
|
19
22
|
IFluidCodeDetailsComparer,
|
|
20
23
|
IFluidModuleWithDetails,
|
|
@@ -23,18 +26,17 @@ import {
|
|
|
23
26
|
IProvideFluidCodeDetailsComparer,
|
|
24
27
|
IProvideRuntimeFactory,
|
|
25
28
|
IRuntime,
|
|
26
|
-
ReadOnlyInfo,
|
|
27
29
|
isFluidCodeDetails,
|
|
28
|
-
} from "@fluidframework/container-definitions";
|
|
30
|
+
} from "@fluidframework/container-definitions/internal";
|
|
29
31
|
import {
|
|
30
32
|
FluidObject,
|
|
31
33
|
IEvent,
|
|
32
34
|
IRequest,
|
|
33
|
-
type ISignalEnvelope,
|
|
34
35
|
ITelemetryBaseProperties,
|
|
35
36
|
LogLevel,
|
|
36
37
|
} from "@fluidframework/core-interfaces";
|
|
37
|
-
import {
|
|
38
|
+
import { type ISignalEnvelope } from "@fluidframework/core-interfaces/internal";
|
|
39
|
+
import { assert, isPromiseLike, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
38
40
|
import {
|
|
39
41
|
IDocumentService,
|
|
40
42
|
IDocumentServiceFactory,
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
ISnapshot,
|
|
44
46
|
IThrottlingWarning,
|
|
45
47
|
IUrlResolver,
|
|
46
|
-
} from "@fluidframework/driver-definitions";
|
|
48
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
47
49
|
import {
|
|
48
50
|
MessageType2,
|
|
49
51
|
OnlineStatus,
|
|
@@ -52,7 +54,7 @@ import {
|
|
|
52
54
|
isOnline,
|
|
53
55
|
readAndParse,
|
|
54
56
|
runWithRetry,
|
|
55
|
-
} from "@fluidframework/driver-utils";
|
|
57
|
+
} from "@fluidframework/driver-utils/internal";
|
|
56
58
|
import { IQuorumSnapshot } from "@fluidframework/protocol-base";
|
|
57
59
|
import {
|
|
58
60
|
IClient,
|
|
@@ -73,14 +75,13 @@ import {
|
|
|
73
75
|
MessageType,
|
|
74
76
|
SummaryType,
|
|
75
77
|
} from "@fluidframework/protocol-definitions";
|
|
78
|
+
import { ITelemetryLoggerExt, type TelemetryEventCategory } from "@fluidframework/telemetry-utils";
|
|
76
79
|
import {
|
|
77
80
|
EventEmitterWithErrorHandling,
|
|
78
81
|
GenericError,
|
|
79
82
|
IFluidErrorBase,
|
|
80
|
-
ITelemetryLoggerExt,
|
|
81
83
|
MonitoringContext,
|
|
82
84
|
PerformanceEvent,
|
|
83
|
-
type TelemetryEventCategory,
|
|
84
85
|
UsageError,
|
|
85
86
|
connectedEventName,
|
|
86
87
|
createChildLogger,
|
|
@@ -89,9 +90,10 @@ import {
|
|
|
89
90
|
normalizeError,
|
|
90
91
|
raiseConnectedEvent,
|
|
91
92
|
wrapError,
|
|
92
|
-
} from "@fluidframework/telemetry-utils";
|
|
93
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
93
94
|
import structuredClone from "@ungap/structured-clone";
|
|
94
95
|
import { v4 as uuid } from "uuid";
|
|
96
|
+
|
|
95
97
|
import { AttachProcessProps, AttachmentData, runRetriableAttachProcess } from "./attachment.js";
|
|
96
98
|
import { Audience } from "./audience.js";
|
|
97
99
|
import { ConnectionManager } from "./connectionManager.js";
|
package/src/containerContext.ts
CHANGED
|
@@ -6,15 +6,18 @@
|
|
|
6
6
|
import {
|
|
7
7
|
AttachState,
|
|
8
8
|
IAudience,
|
|
9
|
-
IBatchMessage,
|
|
10
|
-
IContainerContext,
|
|
11
9
|
ICriticalContainerError,
|
|
12
10
|
IDeltaManager,
|
|
11
|
+
} from "@fluidframework/container-definitions";
|
|
12
|
+
import {
|
|
13
|
+
IBatchMessage,
|
|
14
|
+
IContainerContext,
|
|
13
15
|
ILoader,
|
|
14
16
|
ILoaderOptions,
|
|
15
|
-
} from "@fluidframework/container-definitions";
|
|
16
|
-
import { type FluidObject
|
|
17
|
-
import {
|
|
17
|
+
} from "@fluidframework/container-definitions/internal";
|
|
18
|
+
import { type FluidObject } from "@fluidframework/core-interfaces";
|
|
19
|
+
import { type ISignalEnvelope } from "@fluidframework/core-interfaces/internal";
|
|
20
|
+
import { IDocumentStorageService, ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
18
21
|
import {
|
|
19
22
|
IClientDetails,
|
|
20
23
|
IDocumentMessage,
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { bufferToString, stringToBuffer } from "@fluid-internal/client-utils";
|
|
7
|
-
import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions";
|
|
7
|
+
import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions/internal";
|
|
8
8
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
9
|
-
import { assert } from "@fluidframework/core-utils";
|
|
9
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
10
10
|
import {
|
|
11
11
|
FetchSource,
|
|
12
12
|
IDocumentService,
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
ISnapshot,
|
|
16
16
|
ISnapshotFetchOptions,
|
|
17
17
|
ISummaryContext,
|
|
18
|
-
} from "@fluidframework/driver-definitions";
|
|
19
|
-
import { UsageError } from "@fluidframework/driver-utils";
|
|
18
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
19
|
+
import { UsageError } from "@fluidframework/driver-utils/internal";
|
|
20
20
|
import {
|
|
21
21
|
ICreateBlobResponse,
|
|
22
22
|
ISnapshotTree,
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
IVersion,
|
|
26
26
|
} from "@fluidframework/protocol-definitions";
|
|
27
27
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
28
|
+
|
|
28
29
|
import { IDetachedBlobStorage } from "./loader.js";
|
|
29
30
|
import { ProtocolTreeStorageService } from "./protocolTreeDocumentStorageService.js";
|
|
30
31
|
import { RetriableDocumentStorageService } from "./retriableDocumentStorageService.js";
|
package/src/contracts.ts
CHANGED
|
@@ -7,12 +7,11 @@ import {
|
|
|
7
7
|
IConnectionDetails,
|
|
8
8
|
ICriticalContainerError,
|
|
9
9
|
IDeltaQueue,
|
|
10
|
-
IFluidCodeDetails,
|
|
11
10
|
ReadOnlyInfo,
|
|
12
|
-
isFluidPackage,
|
|
13
11
|
} from "@fluidframework/container-definitions";
|
|
12
|
+
import { IFluidCodeDetails, isFluidPackage } from "@fluidframework/container-definitions/internal";
|
|
14
13
|
import { IErrorBase, ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
|
|
15
|
-
import { IContainerPackageInfo } from "@fluidframework/driver-definitions";
|
|
14
|
+
import { IContainerPackageInfo } from "@fluidframework/driver-definitions/internal";
|
|
16
15
|
import {
|
|
17
16
|
ConnectionMode,
|
|
18
17
|
IClientConfiguration,
|
package/src/debugLogger.ts
CHANGED
|
@@ -9,14 +9,13 @@ import {
|
|
|
9
9
|
ITelemetryBaseLogger,
|
|
10
10
|
ITelemetryBaseProperties,
|
|
11
11
|
} from "@fluidframework/core-interfaces";
|
|
12
|
-
|
|
12
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
13
13
|
import {
|
|
14
|
-
ITelemetryLoggerExt,
|
|
15
14
|
ITelemetryLoggerPropertyBags,
|
|
16
15
|
createMultiSinkLogger,
|
|
17
16
|
eventNamespaceSeparator,
|
|
18
17
|
formatTick,
|
|
19
|
-
} from "@fluidframework/telemetry-utils";
|
|
18
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
20
19
|
|
|
21
20
|
// This import style is necessary to ensure the emitted JS code works in both CJS and ESM.
|
|
22
21
|
import debugPkg from "debug";
|
package/src/deltaManager.ts
CHANGED
|
@@ -14,15 +14,19 @@ import {
|
|
|
14
14
|
IEventProvider,
|
|
15
15
|
type ITelemetryBaseEvent,
|
|
16
16
|
ITelemetryBaseProperties,
|
|
17
|
-
IThrottlingWarning,
|
|
18
17
|
} from "@fluidframework/core-interfaces";
|
|
19
|
-
import {
|
|
18
|
+
import { IThrottlingWarning } from "@fluidframework/core-interfaces/internal";
|
|
19
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
20
|
+
import { DriverErrorTypes } from "@fluidframework/driver-definitions";
|
|
20
21
|
import {
|
|
21
|
-
DriverErrorTypes,
|
|
22
22
|
IDocumentDeltaStorageService,
|
|
23
23
|
IDocumentService,
|
|
24
|
-
} from "@fluidframework/driver-definitions";
|
|
25
|
-
import {
|
|
24
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
25
|
+
import {
|
|
26
|
+
MessageType2,
|
|
27
|
+
NonRetryableError,
|
|
28
|
+
isRuntimeMessage,
|
|
29
|
+
} from "@fluidframework/driver-utils/internal";
|
|
26
30
|
import {
|
|
27
31
|
ConnectionMode,
|
|
28
32
|
IDocumentMessage,
|
|
@@ -31,17 +35,19 @@ import {
|
|
|
31
35
|
MessageType,
|
|
32
36
|
} from "@fluidframework/protocol-definitions";
|
|
33
37
|
import {
|
|
34
|
-
DataCorruptionError,
|
|
35
|
-
DataProcessingError,
|
|
36
38
|
type ITelemetryErrorEventExt,
|
|
37
39
|
type ITelemetryGenericEventExt,
|
|
38
40
|
ITelemetryLoggerExt,
|
|
41
|
+
} from "@fluidframework/telemetry-utils";
|
|
42
|
+
import {
|
|
43
|
+
DataCorruptionError,
|
|
44
|
+
DataProcessingError,
|
|
39
45
|
UsageError,
|
|
40
46
|
extractSafePropertiesFromMessage,
|
|
41
47
|
isFluidError,
|
|
42
48
|
normalizeError,
|
|
43
49
|
safeRaiseEvent,
|
|
44
|
-
} from "@fluidframework/telemetry-utils";
|
|
50
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
45
51
|
import { v4 as uuid } from "uuid";
|
|
46
52
|
|
|
47
53
|
import {
|
package/src/deltaQueue.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { TypedEventEmitter, performance } from "@fluid-internal/client-utils";
|
|
7
7
|
import { IDeltaQueue, IDeltaQueueEvents } from "@fluidframework/container-definitions";
|
|
8
|
-
import { assert } from "@fluidframework/core-utils";
|
|
8
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
9
|
import Deque from "double-ended-queue";
|
|
10
10
|
|
|
11
11
|
export interface IDeltaQueueWriter<T> {
|
package/src/error.ts
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ContainerErrorTypes } from "@fluidframework/container-definitions";
|
|
7
|
-
import { ITelemetryBaseProperties
|
|
6
|
+
import { ContainerErrorTypes } from "@fluidframework/container-definitions/internal";
|
|
7
|
+
import { ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
|
|
8
|
+
import { IThrottlingWarning } from "@fluidframework/core-interfaces/internal";
|
|
9
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
8
10
|
import {
|
|
9
11
|
IFluidErrorBase,
|
|
10
|
-
ITelemetryLoggerExt,
|
|
11
12
|
LoggingError,
|
|
12
13
|
wrapErrorAndLog,
|
|
13
|
-
} from "@fluidframework/telemetry-utils";
|
|
14
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Warning emitted when requests to storage are being throttled.
|
package/src/loader.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ILoaderOptions as ILoaderOptions1,
|
|
13
13
|
IProvideFluidCodeDetailsComparer,
|
|
14
14
|
LoaderHeader,
|
|
15
|
-
} from "@fluidframework/container-definitions";
|
|
15
|
+
} from "@fluidframework/container-definitions/internal";
|
|
16
16
|
import {
|
|
17
17
|
FluidObject,
|
|
18
18
|
IConfigProviderBase,
|
|
@@ -24,18 +24,19 @@ import {
|
|
|
24
24
|
IDocumentStorageService,
|
|
25
25
|
IResolvedUrl,
|
|
26
26
|
IUrlResolver,
|
|
27
|
-
} from "@fluidframework/driver-definitions";
|
|
27
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
28
28
|
import { IClientDetails } from "@fluidframework/protocol-definitions";
|
|
29
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
29
30
|
import {
|
|
30
|
-
ITelemetryLoggerExt,
|
|
31
31
|
MonitoringContext,
|
|
32
32
|
PerformanceEvent,
|
|
33
33
|
UsageError,
|
|
34
34
|
createChildMonitoringContext,
|
|
35
35
|
mixinMonitoringContext,
|
|
36
36
|
sessionStorageConfigProvider,
|
|
37
|
-
} from "@fluidframework/telemetry-utils";
|
|
37
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
38
38
|
import { v4 as uuid } from "uuid";
|
|
39
|
+
|
|
39
40
|
import { Container } from "./container.js";
|
|
40
41
|
import { DebugLogger } from "./debugLogger.js";
|
|
41
42
|
import { pkgVersion } from "./packageVersion.js";
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { IRequest, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
|
+
import { DriverErrorTypes } from "@fluidframework/driver-definitions";
|
|
7
8
|
import {
|
|
8
|
-
DriverErrorTypes,
|
|
9
9
|
ILocationRedirectionError,
|
|
10
10
|
IUrlResolver,
|
|
11
|
-
} from "@fluidframework/driver-definitions";
|
|
12
|
-
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
11
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
12
|
+
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Checks if the error is location redirection error.
|
package/src/noopHeuristic.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
7
7
|
import { IEvent } from "@fluidframework/core-interfaces";
|
|
8
|
-
import { assert, Timer } from "@fluidframework/core-utils";
|
|
9
|
-
import { isRuntimeMessage } from "@fluidframework/driver-utils";
|
|
8
|
+
import { assert, Timer } from "@fluidframework/core-utils/internal";
|
|
9
|
+
import { isRuntimeMessage } from "@fluidframework/driver-utils/internal";
|
|
10
10
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
11
11
|
|
|
12
12
|
const defaultNoopTimeFrequency = 2000;
|
package/src/packageVersion.ts
CHANGED
package/src/protocol.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IAudienceOwner } from "@fluidframework/container-definitions";
|
|
7
|
-
import { canBeCoalescedByService } from "@fluidframework/driver-utils";
|
|
6
|
+
import { IAudienceOwner } from "@fluidframework/container-definitions/internal";
|
|
7
|
+
import { canBeCoalescedByService } from "@fluidframework/driver-utils/internal";
|
|
8
8
|
import {
|
|
9
9
|
IProtocolHandler as IBaseProtocolHandler,
|
|
10
10
|
IQuorumSnapshot,
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
IDocumentStorageService,
|
|
9
|
+
ISummaryContext,
|
|
10
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
8
11
|
import { ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
9
12
|
|
|
10
13
|
/**
|
package/src/quorum.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IFluidCodeDetails } from "@fluidframework/container-definitions";
|
|
6
|
+
import { IFluidCodeDetails } from "@fluidframework/container-definitions/internal";
|
|
7
7
|
import { ICommittedProposal } from "@fluidframework/protocol-definitions";
|
|
8
8
|
|
|
9
9
|
export function initQuorumValuesFromCodeDetails(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { IDisposable } from "@fluidframework/core-interfaces";
|
|
7
|
-
import { assert } from "@fluidframework/core-utils";
|
|
7
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import {
|
|
9
9
|
FetchSource,
|
|
10
10
|
IDocumentStorageService,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
ISnapshot,
|
|
13
13
|
ISnapshotFetchOptions,
|
|
14
14
|
ISummaryContext,
|
|
15
|
-
} from "@fluidframework/driver-definitions";
|
|
16
|
-
import { runWithRetry } from "@fluidframework/driver-utils";
|
|
15
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
16
|
+
import { runWithRetry } from "@fluidframework/driver-utils/internal";
|
|
17
17
|
import {
|
|
18
18
|
ICreateBlobResponse,
|
|
19
19
|
ISnapshotTree,
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
ISummaryTree,
|
|
22
22
|
IVersion,
|
|
23
23
|
} from "@fluidframework/protocol-definitions";
|
|
24
|
-
import {
|
|
24
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
25
|
+
import { GenericError, UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
25
26
|
|
|
26
27
|
export class RetriableDocumentStorageService implements IDocumentStorageService, IDisposable {
|
|
27
28
|
private _disposed = false;
|
|
@@ -3,27 +3,33 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
IGetPendingLocalStateProps,
|
|
8
|
+
IRuntime,
|
|
9
|
+
} from "@fluidframework/container-definitions/internal";
|
|
10
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
11
|
import {
|
|
9
12
|
IDocumentStorageService,
|
|
10
13
|
IResolvedUrl,
|
|
11
14
|
ISnapshot,
|
|
12
|
-
} from "@fluidframework/driver-definitions";
|
|
13
|
-
import { isInstanceOfISnapshot } from "@fluidframework/driver-utils";
|
|
15
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
16
|
+
import { isInstanceOfISnapshot } from "@fluidframework/driver-utils/internal";
|
|
14
17
|
import {
|
|
18
|
+
type IDocumentAttributes,
|
|
15
19
|
ISequencedDocumentMessage,
|
|
16
20
|
ISnapshotTree,
|
|
17
21
|
IVersion,
|
|
18
22
|
} from "@fluidframework/protocol-definitions";
|
|
23
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
19
24
|
import {
|
|
20
|
-
ITelemetryLoggerExt,
|
|
21
25
|
MonitoringContext,
|
|
22
26
|
PerformanceEvent,
|
|
23
27
|
UsageError,
|
|
24
28
|
createChildMonitoringContext,
|
|
25
|
-
} from "@fluidframework/telemetry-utils";
|
|
29
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
30
|
+
|
|
26
31
|
import { ISerializableBlobContents, getBlobContentsFromTree } from "./containerStorageAdapter.js";
|
|
32
|
+
import { getDocumentAttributes } from "./utils.js";
|
|
27
33
|
|
|
28
34
|
export interface SnapshotWithBlobs {
|
|
29
35
|
/**
|
|
@@ -65,10 +71,16 @@ export interface IPendingDetachedContainerState extends SnapshotWithBlobs {
|
|
|
65
71
|
pendingRuntimeState?: unknown;
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
interface SnapshotInfo extends SnapshotWithBlobs {
|
|
75
|
+
snapshotSequenceNumber: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
68
78
|
export class SerializedStateManager {
|
|
69
79
|
private readonly processedOps: ISequencedDocumentMessage[] = [];
|
|
70
80
|
private snapshot: SnapshotWithBlobs | undefined;
|
|
71
81
|
private readonly mc: MonitoringContext;
|
|
82
|
+
private latestSnapshot: SnapshotInfo | undefined;
|
|
83
|
+
private refreshSnapshot: Promise<void> | undefined;
|
|
72
84
|
|
|
73
85
|
constructor(
|
|
74
86
|
private readonly pendingLocalState: IPendingContainerState | undefined,
|
|
@@ -78,6 +90,7 @@ export class SerializedStateManager {
|
|
|
78
90
|
"readBlob" | "getSnapshotTree" | "getSnapshot" | "getVersions"
|
|
79
91
|
>,
|
|
80
92
|
private readonly _offlineLoadEnabled: boolean,
|
|
93
|
+
private readonly newSnapshotFetched?: () => void,
|
|
81
94
|
) {
|
|
82
95
|
this.mc = createChildMonitoringContext({
|
|
83
96
|
logger: subLogger,
|
|
@@ -92,6 +105,7 @@ export class SerializedStateManager {
|
|
|
92
105
|
public addProcessedOp(message: ISequencedDocumentMessage) {
|
|
93
106
|
if (this.offlineLoadEnabled) {
|
|
94
107
|
this.processedOps.push(message);
|
|
108
|
+
this.updateSnapshotAndProcessedOpsMaybe();
|
|
95
109
|
}
|
|
96
110
|
}
|
|
97
111
|
|
|
@@ -100,13 +114,12 @@ export class SerializedStateManager {
|
|
|
100
114
|
supportGetSnapshotApi: boolean,
|
|
101
115
|
) {
|
|
102
116
|
if (this.pendingLocalState === undefined) {
|
|
103
|
-
const {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
assert(baseSnapshot !== undefined, 0x8e4 /* Snapshot should exist */);
|
|
117
|
+
const { baseSnapshot, version } = await getSnapshotTree(
|
|
118
|
+
this.mc,
|
|
119
|
+
this.storageAdapter,
|
|
120
|
+
supportGetSnapshotApi,
|
|
121
|
+
specifiedVersion,
|
|
122
|
+
);
|
|
110
123
|
// non-interactive clients will not have any pending state we want to save
|
|
111
124
|
if (this.offlineLoadEnabled) {
|
|
112
125
|
const snapshotBlobs = await getBlobContentsFromTree(
|
|
@@ -119,10 +132,71 @@ export class SerializedStateManager {
|
|
|
119
132
|
} else {
|
|
120
133
|
const { baseSnapshot, snapshotBlobs } = this.pendingLocalState;
|
|
121
134
|
this.snapshot = { baseSnapshot, snapshotBlobs };
|
|
135
|
+
this.refreshSnapshot ??= (async () => {
|
|
136
|
+
this.latestSnapshot = await getLatestSnapshotInfo(
|
|
137
|
+
this.mc,
|
|
138
|
+
this.storageAdapter,
|
|
139
|
+
supportGetSnapshotApi,
|
|
140
|
+
);
|
|
141
|
+
this.newSnapshotFetched?.();
|
|
142
|
+
this.updateSnapshotAndProcessedOpsMaybe();
|
|
143
|
+
})();
|
|
144
|
+
|
|
122
145
|
return { baseSnapshot, version: undefined };
|
|
123
146
|
}
|
|
124
147
|
}
|
|
125
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Updates class snapshot and processedOps if we have a new snapshot and it's among processedOps range.
|
|
151
|
+
*/
|
|
152
|
+
private updateSnapshotAndProcessedOpsMaybe() {
|
|
153
|
+
if (this.latestSnapshot === undefined) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const snapshotSequenceNumber = this.latestSnapshot?.snapshotSequenceNumber;
|
|
157
|
+
if (this.processedOps.length === 0) {
|
|
158
|
+
// can't refresh latest snapshot until we have processed the ops up to it.
|
|
159
|
+
// Pending state would be behind the latest snapshot.
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const firstProcessedOpSequenceNumber = this.processedOps[0].sequenceNumber;
|
|
163
|
+
const lastProcessedOpSequenceNumber =
|
|
164
|
+
this.processedOps[this.processedOps.length - 1].sequenceNumber;
|
|
165
|
+
|
|
166
|
+
if (snapshotSequenceNumber < firstProcessedOpSequenceNumber) {
|
|
167
|
+
// Snapshot seq number is older than our first processed op, which could mean we're fetching
|
|
168
|
+
// the same snapshot that we already have or snapshot is too old, implicating an unexpected behavior.
|
|
169
|
+
this.mc.logger.sendTelemetryEvent({
|
|
170
|
+
category:
|
|
171
|
+
snapshotSequenceNumber < firstProcessedOpSequenceNumber - 1
|
|
172
|
+
? "error"
|
|
173
|
+
: "generic",
|
|
174
|
+
eventName: "OldSnapshotFetchWhileRefreshing",
|
|
175
|
+
snapshotSequenceNumber,
|
|
176
|
+
firstProcessedOpSequenceNumber,
|
|
177
|
+
});
|
|
178
|
+
this.latestSnapshot = undefined;
|
|
179
|
+
} else if (snapshotSequenceNumber <= lastProcessedOpSequenceNumber) {
|
|
180
|
+
// Snapshot seq num is between the first and last processed op.
|
|
181
|
+
// Remove the ops that are already part of the snapshot
|
|
182
|
+
this.processedOps.splice(
|
|
183
|
+
0,
|
|
184
|
+
snapshotSequenceNumber - firstProcessedOpSequenceNumber + 1,
|
|
185
|
+
);
|
|
186
|
+
this.snapshot = this.latestSnapshot;
|
|
187
|
+
this.latestSnapshot = undefined;
|
|
188
|
+
this.mc.logger.sendTelemetryEvent({
|
|
189
|
+
eventName: "SnapshotRefreshed",
|
|
190
|
+
snapshotSequenceNumber,
|
|
191
|
+
firstProcessedOpSequenceNumber,
|
|
192
|
+
newFirstProcessedOpSequenceNumber:
|
|
193
|
+
this.processedOps.length === 0
|
|
194
|
+
? undefined
|
|
195
|
+
: this.processedOps[0].sequenceNumber,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
126
200
|
/**
|
|
127
201
|
* This method is only meant to be used by Container.attach() to set the initial
|
|
128
202
|
* base snapshot when attaching.
|
|
@@ -171,11 +245,84 @@ export class SerializedStateManager {
|
|
|
171
245
|
}
|
|
172
246
|
}
|
|
173
247
|
|
|
248
|
+
/**
|
|
249
|
+
* Retrieves the most recent snapshot and returns its info.
|
|
250
|
+
*
|
|
251
|
+
* @param mc - The monitoring context.
|
|
252
|
+
* @param storageAdapter - The storage adapter providing methods to retrieve the snapshot.
|
|
253
|
+
* @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree.
|
|
254
|
+
* @returns a SnapshotInfo object containing the snapshot tree, snapshot blobs and its sequence number.
|
|
255
|
+
*/
|
|
256
|
+
export async function getLatestSnapshotInfo(
|
|
257
|
+
mc: MonitoringContext,
|
|
258
|
+
storageAdapter: Pick<
|
|
259
|
+
IDocumentStorageService,
|
|
260
|
+
"getSnapshot" | "getSnapshotTree" | "getVersions" | "readBlob"
|
|
261
|
+
>,
|
|
262
|
+
supportGetSnapshotApi: boolean,
|
|
263
|
+
): Promise<SnapshotInfo | undefined> {
|
|
264
|
+
return PerformanceEvent.timedExecAsync(
|
|
265
|
+
mc.logger,
|
|
266
|
+
{ eventName: "GetLatestSnapshotInfo" },
|
|
267
|
+
async () => {
|
|
268
|
+
const { baseSnapshot } = await getSnapshotTree(
|
|
269
|
+
mc,
|
|
270
|
+
storageAdapter,
|
|
271
|
+
supportGetSnapshotApi,
|
|
272
|
+
undefined,
|
|
273
|
+
);
|
|
274
|
+
const snapshotBlobs = await getBlobContentsFromTree(baseSnapshot, storageAdapter);
|
|
275
|
+
const attributes: IDocumentAttributes = await getDocumentAttributes(
|
|
276
|
+
storageAdapter,
|
|
277
|
+
baseSnapshot,
|
|
278
|
+
);
|
|
279
|
+
const snapshotSequenceNumber = attributes.sequenceNumber;
|
|
280
|
+
return { baseSnapshot, snapshotBlobs, snapshotSequenceNumber };
|
|
281
|
+
},
|
|
282
|
+
).catch(() => undefined);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Retrieves a snapshot from the storage adapter and transforms it into an ISnapshotTree object.
|
|
287
|
+
*
|
|
288
|
+
* @param mc - The monitoring context.
|
|
289
|
+
* @param storageAdapter - The storage adapter providing methods to retrieve the snapshot.
|
|
290
|
+
* @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree.
|
|
291
|
+
* @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
|
|
292
|
+
* @returns - An ISnapshotTree and its version.
|
|
293
|
+
*/
|
|
294
|
+
async function getSnapshotTree(
|
|
295
|
+
mc: MonitoringContext,
|
|
296
|
+
storageAdapter: Pick<
|
|
297
|
+
IDocumentStorageService,
|
|
298
|
+
"getSnapshot" | "getSnapshotTree" | "getVersions"
|
|
299
|
+
>,
|
|
300
|
+
supportGetSnapshotApi: boolean,
|
|
301
|
+
specifiedVersion: string | undefined,
|
|
302
|
+
): Promise<{ baseSnapshot: ISnapshotTree; version?: IVersion }> {
|
|
303
|
+
const { snapshot, version } = supportGetSnapshotApi
|
|
304
|
+
? await fetchISnapshot(mc, storageAdapter, specifiedVersion)
|
|
305
|
+
: await fetchISnapshotTree(mc, storageAdapter, specifiedVersion);
|
|
306
|
+
const baseSnapshot: ISnapshotTree | undefined = isInstanceOfISnapshot(snapshot)
|
|
307
|
+
? snapshot.snapshotTree
|
|
308
|
+
: snapshot;
|
|
309
|
+
assert(baseSnapshot !== undefined, 0x8e4 /* Snapshot should exist */);
|
|
310
|
+
return { baseSnapshot, version };
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Fetches an ISnapshot from a storage adapter based on the specified version.
|
|
315
|
+
*
|
|
316
|
+
* @param mc - The monitoring context.
|
|
317
|
+
* @param storageAdapter - The storage adapter providing a getSnapshot method to retrieve the ISnapshot and version.
|
|
318
|
+
* @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
|
|
319
|
+
* @returns - The fetched snapshot tree and its version.
|
|
320
|
+
*/
|
|
174
321
|
export async function fetchISnapshot(
|
|
175
322
|
mc: MonitoringContext,
|
|
176
323
|
storageAdapter: Pick<IDocumentStorageService, "getSnapshot">,
|
|
177
324
|
specifiedVersion: string | undefined,
|
|
178
|
-
): Promise<{ snapshot?: ISnapshot
|
|
325
|
+
): Promise<{ snapshot?: ISnapshot; version?: IVersion }> {
|
|
179
326
|
const snapshot = await storageAdapter.getSnapshot?.({ versionId: specifiedVersion });
|
|
180
327
|
const version: IVersion | undefined =
|
|
181
328
|
snapshot?.snapshotTree.id === undefined
|
|
@@ -190,7 +337,6 @@ export async function fetchISnapshot(
|
|
|
190
337
|
eventName: "getSnapshotTreeFailed",
|
|
191
338
|
id: specifiedVersion,
|
|
192
339
|
});
|
|
193
|
-
// Not sure if this should be here actually
|
|
194
340
|
} else if (snapshot !== undefined && version?.id === undefined) {
|
|
195
341
|
mc.logger.sendErrorEvent({
|
|
196
342
|
eventName: "getSnapshotFetchedTreeWithoutVersionId",
|
|
@@ -201,9 +347,12 @@ export async function fetchISnapshot(
|
|
|
201
347
|
}
|
|
202
348
|
|
|
203
349
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* @
|
|
350
|
+
* Fetches an ISnapshotTree from a storage adapter based on the specified version.
|
|
351
|
+
*
|
|
352
|
+
* @param mc - The monitoring context.
|
|
353
|
+
* @param storageAdapter - The storage adapter providing methods to retrieve the ISnapshotTree and version.
|
|
354
|
+
* @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.
|
|
355
|
+
* @returns - The fetched snapshot tree and its version.
|
|
207
356
|
*/
|
|
208
357
|
export async function fetchISnapshotTree(
|
|
209
358
|
mc: MonitoringContext,
|