• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mizosoft / methanol
91%
master: 89%

Build:
Build:
LAST BUILD BRANCH: retryer
DEFAULT BRANCH: master
Repo Added 20 Mar 2020 10:22PM UTC
Files 145
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH fix-missed-response
branch: fix-missed-response
CHANGE BRANCH
x
Reset
  • fix-missed-response
  • 34-disable-decompression-for-HEADS
  • 35-strip-content-encoding
  • adapter-codec-touchups
  • adapter-improvements
  • allow-creating-websockets
  • bcs-touch-ups
  • bugfix/build-on-aarch64
  • cache-touch-ups
  • cache-updates
  • cache-updates-2
  • cancellation
  • crp-cwp-touchups
  • dead-code
  • decrease-scheduler-core-size
  • dependency-updates
  • doc-updates
  • dont-releast-on-bg-revalidation
  • fail-on-duplicate-directives
  • fix-46
  • fix-decoder-hanging
  • fix-decompression-hang
  • fix-method-copy
  • fix-snapshotting
  • fix-timeout-memory-leak
  • fix-windows-diskstore-http-caching
  • headers-accumulator-spec
  • http-caching
  • invalid-expires
  • investigate-ci-failure
  • jackson-polyformat
  • jaxb-jakarta
  • jdk-api-updates
  • kotlin-extension-updates
  • kotlin-extensions
  • local-properties
  • master
  • mockexecutor-tostring-race
  • multipartbodypublisher-formpart-test
  • name-fallbackexecutor-thread
  • normalize-dates
  • offer-to-add
  • pass_emit_failures_downstream
  • plain-native-tests
  • proper-tostring
  • properly-setup-coveralls
  • quarkus-native-test
  • redis
  • redis-store-touch-ups
  • refactor-workflows
  • remove-join
  • response-publisher
  • responsebuilder-static-factory
  • responsepayload-is
  • retain-status-header
  • retryer
  • save-request-copy
  • set-headers
  • smarter-closure
  • spi-touchups
  • spring-boot-fix
  • static-analysis
  • structured-suffix
  • test-subscriber-trylock
  • test-timeout-and-interruption
  • test-timeout-touch-ups
  • unify-fallback-executor
  • use-daemon-threads
  • use-linkedhashmap
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • wbp-memory-optimization

29 Apr 2024 12:09AM UTC coverage: 91.309% (+0.006%) from 91.303%
#236

Pull #69

github

mizosoft
Fix missed response for HttpResponsePublisher

Because `onResponse(response)` decrements `ongoing` prematurely (before
submitting the response and potentially completing downstream), the last
response passed might be missed when a race happens with
`onInitialResponseBodyCompletion()`. Consider this scenario:

 - `onResponse` & `onInitialResponseBodyCompletion` interleave.
 - `onResponse` acquires the lock first, and decrements `ongoing`. It
   won't perceive initial body completion, so it won't want to complete
   downstream.
 - `onInitialResponseBodyCompletion` acquires the lock later, and perceives
   no ongoing responses, so it proceeds with the intent to complete downstream.
 - `onInitialResponseBodyCompletion` continues, and calls `complete()`, which
   pushes the sentinel to the queue.
 - `onResponse` continues to `submit(response)`, but the response is submitted
   after the sentinel and is hence ignored.

The fix is to not prematurely decrement `ongoing` when the last response is received,
but do so after the response is submitted. This way, `onInitialResponseBodyCompletion`
never perceives a completed stream that is not **really** completed.
Pull Request #69: Fix missed response for HttpResponsePublisher

7 of 7 new or added lines in 1 file covered. (100.0%)

6682 of 7318 relevant lines covered (91.31%)

0.91 hits per line

Relevant lines Covered
Build:
Build:
7318 RELEVANT LINES 6682 COVERED LINES
0.91 HITS PER LINE
Source Files on fix-missed-response
  • Tree
  • List 135
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
#236 fix-missed-response Fix missed response for HttpResponsePublisher Because `onResponse(response)` decrements `ongoing` prematurely (before submitting the response and potentially completing downstream), the last response passed might be missed when a race happens wit... Pull #69 29 Apr 2024 12:24AM UTC mizosoft github
91.31
See All Builds (531)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc