[
https://issues.apache.org/jira/browse/GROOVY-12287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106916#comment-18106916
]
ASF GitHub Bot commented on GROOVY-12287:
-----------------------------------------
github-actions[bot] commented on PR #2824:
URL: https://github.com/apache/groovy/pull/2824#issuecomment-5380844739
### JMH summary — indy (commit `0d17785`)
Speedup vs trailing 90-day baseline on gh-pages. Higher = faster.
`1.00` = in line with history. Per-benchmark ratio, geomean within group.
Time-per-op units inverted so direction is consistent. The *calibrated*
column divides out this runner's speed vs the baseline hardware, as
measured by Groovy-independent pure-Java ruler benchmarks.
| Group | Speedup | Calibrated | n |
|--------|---------|------------|---|
| bench | 1.240 × | 1.227 × | 99 |
| core | 9.073 × | 8.172 × | 83 |
| grails | 4.422 × | 3.582 × | 80 |
> ⚠️ **5 benchmarks at least 1.5× slower than the 90-day baseline:**
> - `org.apache.groovy.bench.AryBench.groovyCS ( {"n":"1000000"} )` — 2.22×
slower (calibrated)
> - `org.apache.groovy.bench.StaticMethodCallIndyBench.staticChain_groovyCS`
— 1.65× slower (calibrated)
> -
`org.apache.groovy.bench.dispatch.CallsiteBench.dispatch_3_polymorphic_groovyColdReflect`
— 1.59× slower (calibrated)
> -
`org.apache.groovy.bench.dispatch.CallsiteBench.dispatch_3_polymorphic_groovy`
— 1.55× slower (calibrated)
> -
`org.apache.groovy.perf.grails.DynamicDispatchBench.propertyMissingSingleName`
— 1.55× slower (calibrated)
> ⚠️ Runner speed differs ≥15% from the historical baseline hardware for:
grails-ad. Raw speedups are not meaningful for those parts — use the calibrated
column.
<sub>Runner calibration (this run vs baseline hardware): bench 1.06× (26
rulers) · core-ag 1.12× (3 rulers) · core-hz 1.09× (3 rulers) · grails-ad 1.42×
(3 rulers) · grails-ez 1.10× (3 rulers)</sub>
<sub>Baseline: <code>dev/bench/jmh/<part>/indy/data.js</code> on
gh-pages, trailing 90 days. <a
href="https://apache.github.io/groovy/dev/bench/jmh/summary.html">Daily
dashboard</a> · <a
href="https://apache.github.io/groovy/dev/bench/jmh/">Per-suite raw
data</a></sub>
<!
> HttpBuilder: retry once on a stale keep-alive connection
> --------------------------------------------------------
>
> Key: GROOVY-12287
> URL: https://issues.apache.org/jira/browse/GROOVY-12287
> Project: Groovy
> Issue Type: Bug
> Reporter: Daniel Sun
> Priority: Major
>
> HttpBuilder follows redirects itself whenever {{followRedirects}} is enabled.
> The next hop goes through the same JDK {{HttpClient}} and may reuse a
> keep-alive connection the peer has already closed.
> JDK {{HttpClient}} retries that failure for GET/HEAD, but not for
> PUT/POST/PATCH. A same-origin 301 of a PUT then fails intermittently:
> {noformat}
> java.lang.RuntimeException: I/O error during HTTP request PUT
> http://127.0.0.1:.../api/put-dst
> Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
> Caused by: java.io.IOException: Broken pipe
> {noformat}
> Seen on
> {{HttpBuilderTest.confineToBaseUriPreservesNonPostMethodAcrossRedirectOn301}}
> (GROOVY-12182). Redirect following is always manual (GROOVY-12274). GET
> follow-ups do not flake: the JDK client retries them.
> h2. Cause
> A common trigger is {{com.sun.net.httpserver.HttpServer}}:
> {{sendResponseHeaders(status, -1)}} closes the exchange immediately. If the
> request body was never read, that close drops the TCP connection *without*
> sending {{Connection: close}}. The client pools the socket, reuses it for the
> next hop, and PUT is not retried.
> The same class of failure happens against any HTTP/1.1 peer that silently
> drops a keep-alive connection (idle timeout, 3xx of a request with a body,
> etc.).
> h2. Expected
> With {{followRedirects true}}, a PUT that receives 301 should reach the
> {{Location}} target with method and body preserved
> ({{HttpClient.Redirect.NORMAL}}).
> h2. Actual
> The follow-up PUT occasionally throws the I/O error above before any response
> bytes are read.
> h2. Fix
> # Retry *once* in {{HttpBuilder.send}} / {{sendAsync}} when the I/O error
> indicates a stale connection ({{header parser received no bytes}}, broken
> pipe, connection reset). Do not retry timeouts or interrupts.
> # Drain the request body in test {{HttpServer}} redirect handlers *before*
> {{sendResponseHeaders(status, -1)}}, so the mock server does not drop the
> socket without advertising it.
> Regression: {{HttpBuilderStaleConnectionTest}} (peer consumes the request and
> closes with no response; PUT and {{putAsync}} recover on the second
> connection).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)