Repository navigation
Commit 826d25d
committed
[fix](arrow-flight) Finalize deferred coordinator when GetFlightInfo fails after deferral
For an Arrow Flight external-table scan, executeAndSendResult() registers the
query's coordinator as a deferred executor on the ConnectContext (kept alive
across GetFlightInfo -> DoGet, see apache#62259) right after submitting it to the BE.
GetFlightInfo then still has to fetch the Arrow schema from the BE. If that
fetch fails (timeout / non-OK / empty / mismatched schema / RPC error),
FlightSqlConnectProcessor.close() skips the deferred executor and the outer
catch only rethrows. No FlightInfo is returned, so no DoGet will ever pull the
results, yet the coordinator (its external-table batch SplitSource, the query
queue slot and the query registration) stays alive until the next query starts
or the connection is torn down.
Finalize the deferred coordinator on the GetFlightInfo error path:
executeQueryStatement's catch now calls closeFlightSqlDeferredExecutors(). At
that point the list holds only this failed query's coordinator (the previous
one was already finalized at the top of the method), and this covers every
post-deferral failure, not just the schema fetch.
Add DorisFlightSqlProducerTest.testGetFlightInfoFinalizesDeferredExecutorWhen
SchemaFetchFails, which defers a coordinator then fails the schema fetch and
asserts the deferred executor is finalized (verified to fail without the fix).1 parent d4a974d commit 826d25d
2 files changed
Lines changed: 73 additions & 0 deletions
File tree
- fe/fe-core/src
- main/java/org/apache/doris/service/arrowflight
- test/java/org/apache/doris/service/arrowflight
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
287 | 295 | | |
288 | 296 | | |
289 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
145 | 210 | | |
0 commit comments