Commit 0044826
authored
[Fix](batch) prevent writer deadlock from currentCacheBytes drift (#653)
DorisBatchStreamLoad increments currentCacheBytes by the client-side record bytes on insert, but decrements it by respContent.getLoadBytes() on a successful load. Whenever the BE-reported value is smaller than what the client buffered, either by partial_columns=true, compress_type=gz, etc, each load leaks a few bytes from the counter.
Over time the leak accumulates above maxBlockedBytes, so writeRecord parks on block.await() forever even though bufferMap and flushQueue are empty. The job freezes with no exception, only repeating Cache full, waiting for flush and bufferMap is empty, no need to flush null logs.1 parent 06edd0c commit 0044826
1 file changed
Lines changed: 13 additions & 15 deletions
File tree
- flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/sink/batch
Lines changed: 13 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
205 | 217 | | |
206 | 218 | | |
207 | 219 | | |
| |||
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
| |||
499 | 497 | | |
500 | 498 | | |
501 | 499 | | |
502 | | - | |
| 500 | + | |
503 | 501 | | |
504 | 502 | | |
505 | 503 | | |
| |||
0 commit comments