@fluidframework/odsp-driver 0.53.0 → 0.54.2
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/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/odspDocumentDeltaConnection.js +6 -2
- package/dist/odspDocumentDeltaConnection.js.map +1 -1
- package/dist/odspDocumentService.d.ts +1 -1
- package/dist/odspDocumentService.d.ts.map +1 -1
- package/dist/odspDocumentService.js +11 -23
- package/dist/odspDocumentService.js.map +1 -1
- package/dist/odspSummaryUploadManager.d.ts +1 -1
- package/dist/odspSummaryUploadManager.d.ts.map +1 -1
- package/dist/odspSummaryUploadManager.js +7 -20
- package/dist/odspSummaryUploadManager.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/vroom.d.ts.map +1 -1
- package/dist/vroom.js +4 -1
- package/dist/vroom.js.map +1 -1
- package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
- package/lib/odspDocumentDeltaConnection.js +6 -2
- package/lib/odspDocumentDeltaConnection.js.map +1 -1
- package/lib/odspDocumentService.d.ts +1 -1
- package/lib/odspDocumentService.d.ts.map +1 -1
- package/lib/odspDocumentService.js +12 -24
- package/lib/odspDocumentService.js.map +1 -1
- package/lib/odspSummaryUploadManager.d.ts +1 -1
- package/lib/odspSummaryUploadManager.d.ts.map +1 -1
- package/lib/odspSummaryUploadManager.js +8 -21
- package/lib/odspSummaryUploadManager.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/vroom.d.ts.map +1 -1
- package/lib/vroom.js +4 -1
- package/lib/vroom.js.map +1 -1
- package/package.json +7 -7
- package/src/odspDocumentDeltaConnection.ts +7 -3
- package/src/odspDocumentService.ts +19 -25
- package/src/odspSummaryUploadManager.ts +7 -22
- package/src/packageVersion.ts +1 -1
- package/src/vroom.ts +6 -1
|
@@ -9,7 +9,7 @@ import { ISummaryContext } from "@fluidframework/driver-definitions";
|
|
|
9
9
|
import { getGitType } from "@fluidframework/protocol-base";
|
|
10
10
|
import * as api from "@fluidframework/protocol-definitions";
|
|
11
11
|
import { InstrumentedStorageTokenFetcher } from "@fluidframework/odsp-driver-definitions";
|
|
12
|
-
import { PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
12
|
+
import { loggerToMonitoringContext, MonitoringContext, PerformanceEvent } from "@fluidframework/telemetry-utils";
|
|
13
13
|
import {
|
|
14
14
|
IOdspSummaryPayload,
|
|
15
15
|
IWriteSummaryResponse,
|
|
@@ -24,23 +24,6 @@ import { getWithRetryForTokenRefresh } from "./odspUtils";
|
|
|
24
24
|
|
|
25
25
|
/* eslint-disable max-len */
|
|
26
26
|
|
|
27
|
-
// Gate that when flipped, instructs to mark unreferenced nodes as such in the summary sent to SPO.
|
|
28
|
-
function gatesMarkUnreferencedNodes() {
|
|
29
|
-
try {
|
|
30
|
-
// Leave override for testing purposes
|
|
31
|
-
if (typeof localStorage === "object" && localStorage !== null) {
|
|
32
|
-
if (localStorage.FluidMarkUnreferencedNodes === "1") {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
if (localStorage.FluidMarkUnreferencedNodes === "0") {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
} catch (e) {}
|
|
40
|
-
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
27
|
/**
|
|
45
28
|
* This class manages a summary upload. When it receives a call to upload summary, it converts the summary tree into
|
|
46
29
|
* a snapshot tree and then uploads that to the server.
|
|
@@ -48,20 +31,22 @@ function gatesMarkUnreferencedNodes() {
|
|
|
48
31
|
export class OdspSummaryUploadManager {
|
|
49
32
|
// Last proposed handle of the uploaded app summary.
|
|
50
33
|
private lastSummaryProposalHandle: string | undefined;
|
|
34
|
+
private readonly mc: MonitoringContext;
|
|
51
35
|
|
|
52
36
|
constructor(
|
|
53
37
|
private readonly snapshotUrl: string,
|
|
54
38
|
private readonly getStorageToken: InstrumentedStorageTokenFetcher,
|
|
55
|
-
|
|
39
|
+
logger: ITelemetryLogger,
|
|
56
40
|
private readonly epochTracker: EpochTracker,
|
|
57
41
|
) {
|
|
42
|
+
this.mc = loggerToMonitoringContext(logger);
|
|
58
43
|
}
|
|
59
44
|
|
|
60
45
|
public async writeSummaryTree(tree: api.ISummaryTree, context: ISummaryContext) {
|
|
61
46
|
// If the last proposed handle is not the proposed handle of the acked summary(could happen when the last summary get nacked),
|
|
62
47
|
// then re-initialize the caches with the previous ones else just update the previous caches with the caches from acked summary.
|
|
63
48
|
if (context.proposalHandle !== this.lastSummaryProposalHandle) {
|
|
64
|
-
this.logger.sendTelemetryEvent({
|
|
49
|
+
this.mc.logger.sendTelemetryEvent({
|
|
65
50
|
eventName: "LastSummaryProposedHandleMismatch",
|
|
66
51
|
ackedSummaryProposedHandle: context.proposalHandle,
|
|
67
52
|
lastSummaryProposalHandle: this.lastSummaryProposalHandle,
|
|
@@ -107,7 +92,7 @@ export class OdspSummaryUploadManager {
|
|
|
107
92
|
|
|
108
93
|
const postBody = JSON.stringify(snapshot);
|
|
109
94
|
|
|
110
|
-
return PerformanceEvent.timedExecAsync(this.logger,
|
|
95
|
+
return PerformanceEvent.timedExecAsync(this.mc.logger,
|
|
111
96
|
{
|
|
112
97
|
eventName: "uploadSummary",
|
|
113
98
|
attempt: options.refresh ? 2 : 1,
|
|
@@ -145,7 +130,7 @@ export class OdspSummaryUploadManager {
|
|
|
145
130
|
tree: api.ISummaryTree,
|
|
146
131
|
rootNodeName: string,
|
|
147
132
|
path: string = "",
|
|
148
|
-
markUnreferencedNodes: boolean =
|
|
133
|
+
markUnreferencedNodes: boolean = this.mc.config.getBoolean("Fluid.Driver.Odsp.MarkUnreferencedNodes") ?? true,
|
|
149
134
|
) {
|
|
150
135
|
const snapshotTree: IOdspSummaryTree = {
|
|
151
136
|
type: "tree",
|
package/src/packageVersion.ts
CHANGED
package/src/vroom.ts
CHANGED
|
@@ -88,11 +88,16 @@ export async function fetchJoinSession(
|
|
|
88
88
|
logger,
|
|
89
89
|
);
|
|
90
90
|
|
|
91
|
+
const socketUrl = response.content.deltaStreamSocketUrl;
|
|
92
|
+
// expecting socketUrl to be something like https://{hostName}/...
|
|
93
|
+
const webSocketHostName = socketUrl.split("/")[2];
|
|
94
|
+
|
|
91
95
|
// TODO SPO-specific telemetry
|
|
92
96
|
event.end({
|
|
93
97
|
...response.commonSpoHeaders,
|
|
94
98
|
// pushV2 websocket urls will contain pushf
|
|
95
|
-
pushv2:
|
|
99
|
+
pushv2: socketUrl.includes("pushf"),
|
|
100
|
+
webSocketHostName,
|
|
96
101
|
});
|
|
97
102
|
|
|
98
103
|
if (response.content.runtimeTenantId && !response.content.tenantId) {
|