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

valkyrjaio / valkyrja-java / 30614107772
100%

Build:
DEFAULT BRANCH: 26.x
Ran 31 Jul 2026 07:49AM UTC
Jobs 1
Files 670
Run time 2min
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

31 Jul 2026 07:48AM UTC coverage: 100.0%. Remained the same
30614107772

push

github

web-flow
[Grpc] fix: Dispatch a buffered call on a per-call virtual thread (#86)

# Description

Follow-up to #82, which recorded this as a known constraint rather than
fixing it.

The buffered path ran the whole pipeline inline from `onHalfClose`, on
whatever thread the gRPC
library used to deliver the callback. A handler that blocks — on I/O, on
a lock, or on the outbound
flow-control gate added in #82 — therefore occupied the adapter's
callback executor for its full
duration. Two consequences followed:

- An adapter configured with `directExecutor()` would stall the
transport's event loop. No shipped
adapter does that, so nothing was broken today, but the constraint was
real and undocumented.
- grpc-java serializes listener callbacks per call, so while
`onHalfClose` was on the stack the
library could not deliver `onReady` or `onCancel` for that call. The
flow-control gate from #82
worked around this by re-reading `ServerCall.isReady()` on a bounded
interval instead of relying
  on the signal.

The streaming path already avoided all of this by dispatching on a
per-call virtual thread. This
gives the buffered path the same treatment, so the two models now agree.

## What changes

`onHalfClose` builds the `ServiceCall` and then starts a virtual thread
to run the pipeline,
returning immediately.

Building the call stays on the transport thread deliberately, and that
ordering is load-bearing:
`buildCall` reads the deadline from the gRPC `Context`, which is bound
to the delivering thread and
reads as absent from a worker. Moving that read onto the virtual thread
would silently turn every
deadline into `Deadline.none()` — no failure, just a call that never
times out. The streaming path
captures its `Context`-derived values on the transport thread for
exactly this reason; the buffered
path now does the same.

Two consequences are worth stating, because both invert a claim the code
previously made:

- **`onCancel` can now fire while a handler runs.** The old comment... (continued)

1923 of 1923 branches covered (100.0%)

Branch coverage included in aggregate %.

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

7039 of 7039 relevant lines covered (100.0%)

4.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30614107772.1 31 Jul 2026 07:49AM UTC 670
100.0
GitHub Action Run
Source Files on build 30614107772
  • Tree
  • List 670
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30614107772
  • 89c9f442 on github
  • Prev Build on 26.x (#30613110124)
  • Next Build on 26.x (#30617269515)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc