Skip to content

RUM-6060 stop upload worker on upload failure#2242

Merged
xgouchet merged 1 commit into
release/2.13.0from
xgouchet/RUM-6060/prevent_upload_worker_loop
Sep 6, 2024
Merged

RUM-6060 stop upload worker on upload failure#2242
xgouchet merged 1 commit into
release/2.13.0from
xgouchet/RUM-6060/prevent_upload_worker_loop

Conversation

@xgouchet

@xgouchet xgouchet commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR stops a potential infinite loop in some rare case. The upload worker is waken up after the application exits or crashes to send the remaining events to Datadog. Unfortunately it pulls the available batches one at a time, in a loop, and in some situations, an error would not lead to the batch being discarded, which could lead to looping over the same batch until it succeeds.

@xgouchet
xgouchet requested review from a team as code owners September 5, 2024 12:22
@xgouchet
xgouchet changed the base branch from develop to release/2.13.0 September 5, 2024 12:22
@xgouchet
xgouchet force-pushed the xgouchet/RUM-6060/prevent_upload_worker_loop branch from 0134f17 to 9c74e12 Compare September 5, 2024 12:35
0xnm
0xnm previously approved these changes Sep 5, 2024
jonathanmos
jonathanmos previously approved these changes Sep 5, 2024
@xgouchet
xgouchet dismissed stale reviews from jonathanmos and 0xnm via b3b46f5 September 5, 2024 14:43
@xgouchet
xgouchet force-pushed the xgouchet/RUM-6060/prevent_upload_worker_loop branch from 9c74e12 to b3b46f5 Compare September 5, 2024 14:43
@codecov-commenter

codecov-commenter commented Sep 5, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.97%. Comparing base (eb6c153) to head (b3b46f5).
Report is 2 commits behind head on release/2.13.0.

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/2.13.0    #2242      +/-   ##
==================================================
- Coverage           70.14%   69.97%   -0.17%     
==================================================
  Files                 727      727              
  Lines               27051    27047       -4     
  Branches             4558     4559       +1     
==================================================
- Hits                18973    18924      -49     
- Misses               6816     6840      +24     
- Partials             1262     1283      +21     
Files with missing lines Coverage Δ
...id/core/internal/data/upload/DataOkHttpUploader.kt 89.36% <100.00%> (-1.36%) ⬇️
.../android/core/internal/data/upload/UploadStatus.kt 88.46% <ø> (ø)
.../android/core/internal/data/upload/UploadWorker.kt 73.68% <100.00%> (-12.80%) ⬇️
...dog/android/core/internal/metrics/RemovalReason.kt 91.67% <100.00%> (ø)

... and 29 files with indirect coverage changes

@xgouchet
xgouchet requested a review from 0xnm September 5, 2024 15:52
@xgouchet
xgouchet merged commit 7c4b3d9 into release/2.13.0 Sep 6, 2024
@xgouchet
xgouchet deleted the xgouchet/RUM-6060/prevent_upload_worker_loop branch September 6, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants