FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

[AFR Ask] Send the reason when making getDeltas calls

Open MarioJGMsoft opened this issue 1 year ago • 1 comments

Fixes: AB#6959

Description

Yang Gao to detail the specifics and data/incident information in the Feature Description

Optimize getDelta / internal service calls to reduce load on Alfred & Riddler and minimize impact on customer traffic

FRS has observed some unexpected getDeltas calls. If the client can send FRS the reasons why the calls were made, it can greatly help the investigations. One example is that we have seen some getDetals calls trying to read very old ops, which were generated tens of days ago, and it's hard for us to understand what triggered these calls.

Reviewer Guidance

Let me know if there's a better way to send the reason to AFR.

MarioJGMsoft avatar Oct 15 '24 23:10 MarioJGMsoft

@fluid-example/bundle-size-tests: +267 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 463.61 KB 463.64 KB +35 Bytes
azureClient.js 562.45 KB 562.51 KB +71 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 261.86 KB 261.87 KB +14 Bytes
fluidFramework.js 424.82 KB 424.84 KB +14 Bytes
loader.js 134.17 KB 134.19 KB +14 Bytes
map.js 42.71 KB 42.71 KB +7 Bytes
matrix.js 148.32 KB 148.33 KB +7 Bytes
odspClient.js 528.29 KB 528.34 KB +49 Bytes
odspDriver.js 97.84 KB 97.86 KB +21 Bytes
odspPrefetchSnapshot.js 42.81 KB 42.83 KB +14 Bytes
sharedString.js 164.17 KB 164.17 KB +7 Bytes
sharedTree.js 415.28 KB 415.29 KB +7 Bytes
Total Size 3.36 MB 3.36 MB +267 Bytes

Baseline commit: 8d470085fb41a84212a993a1ebbbf903fd4f16b6

Generated by :no_entry_sign: dangerJS against 82ebb7758e3ecee1805441b876b4a5e219dc1c1c

msfluid-bot avatar Oct 16 '24 00:10 msfluid-bot

Looks good from AFR perspective, just curious what are the possible values for fetchReason and where is it set? Also, thanks for adding this.

These are the possible values:

PostDocumentOpen_fetch AfterConnection_fetch ReconnectOps_fetch DocumentOpen_cached_pending_fetch opHandler_fetch AfterConnection_pending_fetch InitialOps_fetch ReconnectOps_pending_fetch PostDocumentOpen_pending_fetch OpsBehind_pending_fetch InitialOps_pending_fetch ReconnectOps_pending_pending_fetch OpsBehind_fetch DocumentOpen_cached_fetch AfterReadConnection_fetch DocumentOpen_fetch DocumentOpen_cached_pending_pending_fetch opHandler_pending_fetch PostDocumentOpen_pending_pending_fetch InitialOps_pending_pending_fetch DocumentOpen_pending_fetch

And from my understanding, it is set when the fetchMessages() function is called.

MarioJGMsoft avatar Nov 01 '24 23:11 MarioJGMsoft

@MarioJGMsoft Where are you sending this to the service? Seems like you are just adding it to the telemetry event.

jatgarg avatar Nov 07 '24 00:11 jatgarg