Commit fe55058
committed
GH-5723: propagate maxExecutionTime as per-request HTTP response timeout
When setMaxExecutionTime(int) is called on an HTTP-based query or
update, the value is now applied as a per-request response timeout on
the HTTP connection, enforced client-side in addition to being sent as a
server-side hint.
HttpRequest gains an optional responseTimeout field (Duration). Both
SPARQLProtocolSession and RDF4JProtocolSession (which overrides
getQueryMethod/getUpdateMethod) set this field when maxQueryTime > 0.
The Apache HC5 client applies it via
RequestConfig.copy(defaultRequestConfig).setResponseTimeout(),
preserving factory-level defaults (connectionRequest
Timeout, redirectsEnabled, cookieSpec) while overriding only the
response timeout. The default RequestConfig is passed from the factory
to the client at construction time. The JDK client applies it via
HttpRequest.Builder#timeout(), with the per-request value taking
precedence over the global socketTimeoutMs from RDF4JHttpClientConfig.1 parent d44e42d commit fe55058
3 files changed
Lines changed: 41 additions & 4 deletions
File tree
- core/http
- client-apache5/src/main/java/org/eclipse/rdf4j/http/client/apache5
- client/src/test/java/org/eclipse/rdf4j/http/client
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
| |||
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
106 | | - | |
| 114 | + | |
| 115 | + | |
107 | 116 | | |
108 | 117 | | |
109 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
110 | 121 | | |
111 | 122 | | |
112 | 123 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
330 | 356 | | |
331 | 357 | | |
332 | 358 | | |
| |||
0 commit comments