Commit 8c785fa
committed
kgo: fix race between client closing and purging
Purging topics can actually restart consuming.
This can race with killing fetch sessions while closing.
Purging internally calls assignPartitions with the consumer topics.
In general, we need to prevent anything resuming consuming no matter
what, so we add a bool field to the client that forcibly prevents
consuming.1 parent ee392e1 commit 8c785fa
File tree
4 files changed
+20
-12
lines changed- pkg/kgo
4 files changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
| 950 | + | |
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
953 | | - | |
954 | | - | |
| 954 | + | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
958 | 959 | | |
959 | | - | |
960 | | - | |
961 | | - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
962 | 963 | | |
963 | 964 | | |
964 | 965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
927 | 928 | | |
928 | 929 | | |
929 | 930 | | |
930 | | - | |
931 | | - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
932 | 938 | | |
933 | 939 | | |
934 | 940 | | |
| |||
1058 | 1064 | | |
1059 | 1065 | | |
1060 | 1066 | | |
1061 | | - | |
| 1067 | + | |
1062 | 1068 | | |
1063 | 1069 | | |
1064 | 1070 | | |
| |||
1565 | 1571 | | |
1566 | 1572 | | |
1567 | 1573 | | |
1568 | | - | |
| 1574 | + | |
1569 | 1575 | | |
1570 | 1576 | | |
1571 | 1577 | | |
| |||
1621 | 1627 | | |
1622 | 1628 | | |
1623 | 1629 | | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1624 | 1633 | | |
1625 | 1634 | | |
1626 | 1635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | 253 | | |
256 | 254 | | |
257 | 255 | | |
| |||
0 commit comments