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

Fixing log batches logic #114

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Fixing log batches logic #114

merged 2 commits into from
Nov 7, 2024

Conversation

NachoEmbrace
Copy link
Contributor

This issue could be easily triggered by sending many logs at the same time.
Since the function that was closing the batches was made async it caused a race condition when adding many logs 1 at a time.
This caused the log batcher to send batches of incorrect sizes.

@NachoEmbrace NachoEmbrace requested a review from a team as a code owner November 1, 2024 18:03
Copy link

github-actions bot commented Nov 1, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

}
self.cancelBatchDeadline()
self.delegate?.batchFinished(withLogs: batch.logs)
// TODO: Add cleanup step:
Copy link

Choose a reason for hiding this comment

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

  • ⚠️ TODOs should be resolved (Add cleanup step:) (todo)

Copy link

github-actions bot commented Nov 1, 2024

Warnings
⚠️ No CHANGELOG entry added.

Generated by 🚫 Danger Swift against c77bfbd

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.93%. Comparing base (b2da5ac) to head (c77bfbd).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   91.95%   91.93%   -0.03%     
==========================================
  Files         408      410       +2     
  Lines       26457    26465       +8     
==========================================
+ Hits        24329    24330       +1     
- Misses       2128     2135       +7     
Files with missing lines Coverage Δ
...ore/Internal/Logs/Exporter/DefaultLogBatcher.swift 98.64% <100.00%> (+0.05%) ⬆️
...rnal/Logs/Exporter/StorageEmbraceLogExporter.swift 93.33% <100.00%> (ø)
...Logs/Exporter/StorageEmbraceLogExporterTests.swift 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@NachoEmbrace NachoEmbrace merged commit f7d5659 into main Nov 7, 2024
10 checks passed
@NachoEmbrace NachoEmbrace deleted the fix_log_batching_logic branch November 7, 2024 15:11
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.

2 participants