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

fix: add limit of events data length when query from db #304

Merged
merged 18 commits into from
Apr 23, 2024

Conversation

YoloMao
Copy link
Collaborator

@YoloMao YoloMao commented Mar 27, 2024

  • 添加从数据库获取事件的 data 总长度限制:2MB
  • 修复在打开 ASAEnabled 时,因 ACTIVATE 事件延迟发送,从而 events.count 可能为 0,对应的 URLRequest 生成为 nil,导致崩溃产生
  • 修复其他可能导致崩溃的场景
  • vacuum 操作改为 3 天/次
  • 将 encryptEnabled 配置分为 compressEnabled (默认 false) 和 encryptEnabled (默认 false)
  • 在 release 环境下,将不再由于 debugEnabled 为 true 而频繁发送事件

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 80.76923% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 82.71%. Comparing base (3ce88fc) to head (6f56101).
Report is 2 commits behind head on master.

❗ Current head 6f56101 differs from pull request most recent head 07f8ec9. Consider uploading reports for the commit 07f8ec9 to get more accurate results

Files Patch % Lines
...ultServices/GrowingEventRequestEncryptionAdapter.m 20.00% 4 Missing ⚠️
...ltServices/GrowingEventRequestCompressionAdapter.m 50.00% 3 Missing ⚠️
GrowingTrackerCore/Event/GrowingEventManager.m 88.88% 2 Missing ⚠️
Services/Database/GrowingEventFMDatabase.m 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #304      +/-   ##
==========================================
+ Coverage   82.18%   82.71%   +0.53%     
==========================================
  Files         140      140              
  Lines       10090    10115      +25     
==========================================
+ Hits         8292     8367      +75     
+ Misses       1798     1748      -50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@YoloMao YoloMao merged commit d54bef0 into master Apr 23, 2024
13 checks passed
@YoloMao YoloMao deleted the fix/request_body_length branch April 23, 2024 07:32
Copy link

sonarcloud bot commented Apr 23, 2024

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.

None yet

4 participants