Commit 6e43800
fix: wait for in-flight BigQuery writes
BatchProcessor.flush() checked Queue.empty(), which only reports whether an item is still waiting, so it could return after a writer dequeued an item but before that write finished. This waits on the queue's unfinished-task count with Queue.join() so flush() blocks until in-flight writes complete.
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 9516207651 parent 2dc0745 commit 6e43800
2 files changed
Lines changed: 16 additions & 4 deletions
File tree
- src/google/adk/plugins
- tests/unittests/plugins
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1484 | 1484 | | |
1485 | 1485 | | |
1486 | 1486 | | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
1491 | 1490 | | |
1492 | 1491 | | |
1493 | 1492 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8547 | 8547 | | |
8548 | 8548 | | |
8549 | 8549 | | |
| 8550 | + | |
| 8551 | + | |
| 8552 | + | |
| 8553 | + | |
| 8554 | + | |
| 8555 | + | |
| 8556 | + | |
| 8557 | + | |
| 8558 | + | |
| 8559 | + | |
| 8560 | + | |
| 8561 | + | |
| 8562 | + | |
8550 | 8563 | | |
8551 | 8564 | | |
8552 | 8565 | | |
| |||
0 commit comments