-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUM-3458: Fix time drift in RecordedDataQueueHandler #2075
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2075 +/- ##
============================================
+ Coverage 67.39% 83.16% +15.77%
============================================
Files 733 495 -238
Lines 27028 17752 -9276
Branches 4574 2684 -1890
============================================
- Hits 18213 14762 -3451
+ Misses 7587 2250 -5337
+ Partials 1228 740 -488
|
...src/main/kotlin/com/datadog/android/sessionreplay/internal/async/RecordedDataQueueHandler.kt
Outdated
Show resolved
Hide resolved
e4fa696
to
9799a02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Since we care only about item age at this point, using 2 System.nanoTime()
instants is fine and result of this call is monotonically increasing.
However, there is a second timestamp involved, which is attached to the queue item and then used later to build wireframes (nextItem.recordedQueuedItemContext.timestamp
), so it is better to have another pair of eyes for the review here, because I'm don't have a deep knowledge of the whole processing pipeline.
internalLogger = internalLogger, | ||
|
||
/** | ||
* TODO RUMM-0000 consider change to LoggingThreadPoolExecutor once V2 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is time to do it: it is a simple change and can be made in another PR
...src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/SessionReplayRecorder.kt
Outdated
Show resolved
Hide resolved
9799a02
to
5e3f8b3
Compare
What does this PR do?
Fixes an issue in the RecordedDataQueueHandler where the "current" time was being passed in to the loop, but never updated inside it. This could lead to the time drifting when the queue was very long, leading to items being considered out of date.
Motivation
We have telemetry indicating numerous DataQueueItems are being dropped for being out of date.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)