SERVER-133485In Progress

Improve how we calculate recipient fetch delay

We use [now - postBatchResumeTokenTs|https://github.com/10gen/mongo/blob/419942d6ceda18113c25e5995c1b9e0e42c279f5/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp#L231]. The issue is that ts only has second granularity and we use the full ms value of now. This means that if the theoretical time for the resume token was 08:30.940 and time now is 80:30:950, the fetch delay will be reported as 950ms (950 - 0, 0 since ts has second granularity so it is rounded down) instead of the actual 10ms.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
resharding-availabilityresharding-improvementsresharding-metrics-improvements