Skip to content
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

RUMM-2295, RUMM-2296, RUMM-2297: Improvement to the reading batch logic #992

Merged
merged 3 commits into from
Jul 22, 2022

Conversation

0xnm
Copy link
Contributor

@0xnm 0xnm commented Jul 21, 2022

What does this PR do?

This changes does the following:

  • RUMM-2297: Callback is added to notify if batch is not available. This allows to control the upload scheduling mechanism.
  • RUMM-2295: Removed the possibility of stack overflow in UploadWorker by converting recursive batch read to the usage of the queue with tasks.
  • RUMM-2296: Removed the bottleneck in UploadWorker: now if some feature has long upload which fails (and hence needs to retried), other features are going to have a chance to perform upload before retry happens.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm 0xnm requested a review from a team as a code owner July 21, 2022 10:02
@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2022

Codecov Report

Merging #992 (17cb5c7) into feature/sdkv2 (da2dd64) will decrease coverage by 0.01%.
The diff coverage is 86.49%.

@@                Coverage Diff                @@
##           feature/sdkv2     #992      +/-   ##
=================================================
- Coverage          82.91%   82.90%   -0.01%     
=================================================
  Files                295      296       +1     
  Lines               9823     9841      +18     
  Branches            1600     1603       +3     
=================================================
+ Hits                8144     8158      +14     
  Misses              1195     1195              
- Partials             484      488       +4     
Impacted Files Coverage Δ
...atadog/android/v2/core/internal/storage/Storage.kt 0.00% <0.00%> (ø)
.../android/core/internal/data/upload/UploadWorker.kt 85.71% <88.89%> (+2.38%) ⬆️
...v2/core/internal/data/upload/DataUploadRunnable.kt 100.00% <100.00%> (ø)
...id/v2/core/internal/storage/ConsentAwareStorage.kt 96.81% <100.00%> (+0.11%) ⬆️
...android/log/internal/logger/TelemetryLogHandler.kt 75.00% <0.00%> (-25.00%) ⬇️
...ain/java/com/datadog/opentracing/PendingTrace.java 58.62% <0.00%> (-1.72%) ⬇️
...rsistence/file/batch/PlainBatchFileReaderWriter.kt 85.29% <0.00%> (-0.98%) ⬇️
...rc/main/java/com/datadog/opentracing/DDTracer.java 56.07% <0.00%> (-0.42%) ⬇️
...android/v2/core/internal/DatadogContextProvider.kt 81.03% <0.00%> (ø)
...id/webview/internal/rum/WebViewRumEventConsumer.kt 86.05% <0.00%> (+9.30%) ⬆️

@xgouchet xgouchet added the size-medium This PR is medium sized label Jul 21, 2022
Base automatically changed from nogorodnikov/rumm-2347/provide-core-sdk-context to feature/sdkv2 July 21, 2022 10:28
Copy link
Collaborator

@mariusc83 mariusc83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xnm 0xnm merged commit 8d75f58 into feature/sdkv2 Jul 22, 2022
@0xnm 0xnm deleted the nogorodnikov/read_batch_improvements branch July 22, 2022 08:26
@xgouchet xgouchet added this to the 1.16.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-medium This PR is medium sized
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants