fix: cancel pending KSCrash report processing - #8589
Draft
supervacuus wants to merge 1 commit into
Draft
Conversation
supervacuus
requested review from
NinjaLikesCheez,
itaybre,
noahsmartin,
philipphofmann and
philprime
as code owners
July 29, 2026 11:54
📲 Install BuildsiOS
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8576fa5 | 1215.66 ms | 1256.45 ms | 40.79 ms |
| ea690ac | 1217.16 ms | 1261.51 ms | 44.35 ms |
| ffce4be | 1241.52 ms | 1269.87 ms | 28.35 ms |
| 941ad74 | 1214.30 ms | 1247.06 ms | 32.76 ms |
| 053e1df | 1242.04 ms | 1276.19 ms | 34.15 ms |
| edd3780 | 1226.46 ms | 1260.02 ms | 33.57 ms |
| 700456f | 1225.04 ms | 1259.40 ms | 34.36 ms |
| 68e2865 | 1213.20 ms | 1251.37 ms | 38.16 ms |
| 718b8fd | 1221.45 ms | 1241.13 ms | 19.68 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8576fa5 | 24.14 KiB | 1.24 MiB | 1.22 MiB |
| ea690ac | 24.14 KiB | 1.24 MiB | 1.22 MiB |
| ffce4be | 24.14 KiB | 1.24 MiB | 1.22 MiB |
| 941ad74 | 24.14 KiB | 1.25 MiB | 1.22 MiB |
| 053e1df | 24.14 KiB | 1.24 MiB | 1.22 MiB |
| edd3780 | 24.14 KiB | 1.24 MiB | 1.22 MiB |
| 700456f | 24.14 KiB | 1.24 MiB | 1.21 MiB |
| 68e2865 | 24.14 KiB | 1.24 MiB | 1.22 MiB |
| 718b8fd | 24.14 KiB | 1.24 MiB | 1.22 MiB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#skip-changelog (for V10)
📜 Description
Fixes #8535 on top of #8515.
This adds a generation-scoped report-processing session that is canceled upon
SentryKSCrash.Integrationuninstallation.Queued or pre-capture work completes with a retryable error, while work that has committed to client capture finishes normally. Canceled drains also stop before processing another report or running end-of-drain cleanup.
Rergarding review and merge process:
mainbefore reviewing here starts. However, if people consider correct lifecycle handling of pending report processing a precondition for merging feat: process pending KSCrash reports #8515, we can stack it on top.💡 Motivation and Context
Pending KSCrash report processing currently outlives its integration. After
SentrySDK.close(), stale work can continue without a client or be captured upon a later SDK start.The processing session provides nonblocking cancellation, exactly-once filter completion, and isolation between SDK generations.
💚 How did you test it?
Added deterministic tests covering:
Also ran the KSCrash-enabled iOS and macOS test suites locally.
I will follow up with a real on-disk retry and cleanup across launches testing in #8593 (tracking issue: #8539).
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.