Commit 4a8ad8e
authored
KAFKA-19781: Fix to not update positions for partitions being revoked (#20914)
Fix to avoid initializing positions for partitions being revoked, as it
is unneeded (we do not allow fetching from partitions being revoked),
and could lead to NoOffsetForPartitionException on a partition that is
already being revoked (this is confusing for applications).
This is the behaviour we already had for fetch, just applying it to
update positions to align.
This gap was surfaced on edge cases of partitions being assigned and
revoked right away.
Reviewers: Andrew Schofield <[email protected]>, Lucas Brutschy
<[email protected]>1 parent 679854c commit 4a8ad8e
File tree
2 files changed
+15
-4
lines changed- clients/src
- main/java/org/apache/kafka/clients/consumer/internals
- test/java/org/apache/kafka/clients/consumer/internals
2 files changed
+15
-4
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | | - | |
1206 | | - | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1207 | 1209 | | |
1208 | 1210 | | |
1209 | 1211 | | |
1210 | 1212 | | |
1211 | 1213 | | |
1212 | | - | |
| 1214 | + | |
1213 | 1215 | | |
1214 | 1216 | | |
1215 | 1217 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
318 | 327 | | |
319 | 328 | | |
320 | 329 | | |
| |||
0 commit comments