Commit 5c24a38
committed
fix(batch): improve reconnect and shutdown mechanisms
- change condition for reconnecting -- send will always wait for recv
to complete, so checking send.isDone is meaningless. Instead, we rely
on the context's state and the data we've observer from the server.
- Emit OOM's 'shutdown sequence' via the Recv handle, not via BatchContext::onEvent.
This ensures the recv.done is completed correctly on EOF to unblock send's exit.
- add a protoc guard to Reconnecting -- an EOF event should not arrive in this
state.
- fixed BatchContextTest so that stream is not automatically closed when
client closes it's half1 parent a208d7e commit 5c24a38
2 files changed
Lines changed: 101 additions & 73 deletions
File tree
- src
- main/java/io/weaviate/client6/v1/api/collections/batch
- test/java/io/weaviate/client6/v1/api/collections/batch
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
| 522 | + | |
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
614 | 619 | | |
615 | 620 | | |
616 | 621 | | |
| |||
748 | 753 | | |
749 | 754 | | |
750 | 755 | | |
| 756 | + | |
751 | 757 | | |
752 | 758 | | |
753 | | - | |
754 | | - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
755 | 765 | | |
| 766 | + | |
756 | 767 | | |
757 | 768 | | |
758 | 769 | | |
| |||
790 | 801 | | |
791 | 802 | | |
792 | 803 | | |
| 804 | + | |
793 | 805 | | |
794 | | - | |
| 806 | + | |
795 | 807 | | |
796 | 808 | | |
797 | | - | |
| 809 | + | |
798 | 810 | | |
799 | 811 | | |
800 | 812 | | |
| |||
905 | 917 | | |
906 | 918 | | |
907 | 919 | | |
| 920 | + | |
| 921 | + | |
908 | 922 | | |
| 923 | + | |
909 | 924 | | |
910 | 925 | | |
911 | 926 | | |
| |||
0 commit comments