Repository navigation
4.x: Fix Streamable.timeout missing deadlines during synchronous pulls - #8407
Conversation
🐷 TruffleHog + Entropy Beauty ScanAverage entropy of changed code: 4.602 bits/char Changed files entropy: ✅ No secrets or suspicious high-entropy strings found. Mid-4 beauty heuristic in action — powered by our entropy chats! 😊 |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (90.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## 4.x #8407 +/- ##
============================================
- Coverage 98.63% 98.62% -0.01%
Complexity 7184 7184
============================================
Files 826 826
Lines 51048 51055 +7
Branches 6947 6951 +4
============================================
+ Hits 50352 50354 +2
- Misses 474 479 +5
Partials 222 222 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The new code path wasn't covered. I believe using the |
akarnokd
left a comment
There was a problem hiding this comment.
The new code path wasn't covered.
I believe using the Schedulers.trampoline and a timeout of zero will synchronously trigger that path on line 107
🐷 TruffleHog + Entropy Beauty ScanAverage entropy of changed code: 4.6 bits/char Changed files entropy: ✅ No secrets or suspicious high-entropy strings found. Mid-4 beauty heuristic in action — powered by our entropy chats! 😊 |
Streamable.timeoutstarted the timer after callingnext()on the upstream streamer (basesrc/main/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableTimeout.java:77, timer at:79). A synchronousmapcould exceed the deadline and still emit its item, so the subscriber missed the fallback.The timer now starts before the pull (
src/main/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableTimeout.java:82). When the timer wins, it claims upstream cleanup once and waits for the pull to settle. Late mapper and cleanup errors reach the observer without a second call to upstreamfinish(). After successful cleanup, the operator checks downstream disposal immediately before starting the fallback (src/main/java/io/reactivex/rxjava4/internal/operators/streamable/StreamableTimeout.java:97). An idle trampoline worker runs the timer inline, so it can now select the fallback before the first pull.Streamable.timeoutis the sole entry point to this operator. TimedFlowableandObservablealready arm their timers before subscribing.Streamable.takeUntilshares a cancellation helper and uses a separate stop signal.Streamable.onErrorResumeNextswitches on error through its own path.The run below covered the style validators and Checkstyle, plus regressions for expiry during a synchronous pull, a failing cleanup, and disposal during cleanup.
Prepared with AI assistance (Codex and Claude Code) and reviewed with GitHub Copilot.
🤖 Generated with Claude Code