You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ba5f1d5
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(core): Report no-op executor tasks as cancelled (#5874)
* fix(core): Report no-op executor tasks as cancelled (JAVA-628)
NoOpSentryExecutorService returned a FutureTask that is never run and
never cancelled, so a caller had no way to tell a dropped task from a
queued one: isCancelled() and isDone() both stay false forever, and get()
blocks until it times out.
Return an already-cancelled Future instead, matching what
SentryExecutorService already does when its work queue is full, and state
the requirement on ISentryExecutorService so future implementations honour
it. CancelledFuture moves out of SentryExecutorService so both services
share one implementation.
An ActivityLifecycleIntegration test asserted a freshly scheduled ttfd
timeout was not cancelled while running on the no-op executor, so it was
really pinning the old pending-forever behaviour rather than the
scheduling it names. It now uses DeferredExecutorService, which queues.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* changelog
* Update sentry/src/main/java/io/sentry/ISentryExecutorService.java
Co-authored-by: arb <adam.brown@sentry.io>
* Apply suggestions from code review
Co-authored-by: arb <adam.brown@sentry.io>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: arb <adam.brown@sentry.io>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@
7
7
- Prevent inflated cold app start when the OS spawns the process in the background (e.g. FCM push) on API 35+ ([#5841](https://github.com/getsentry/sentry-java/pull/5841))
8
8
- Avoid a CPU busy-loop when recording discarded log or metric envelopes under rate limiting ([#5835](https://github.com/getsentry/sentry-java/pull/5835))
9
9
- `ClientReportRecorder` now reads the item count from the envelope item header instead of deserializing the payload, which under sustained rate limiting could pin CPU cores while repeatedly throwing exceptions
10
+
- Report tasks handed to a no-op `ISentryExecutorService` as cancelled ([#5874](https://github.com/getsentry/sentry-java/pull/5874))
11
+
- `NoOpSentryExecutorService` previously returned a `Future` that was never run and never cancelled, so callers could not tell a dropped task from a queued one and `get()` would block until its timeout
0 commit comments