Commit ef6c115
GH-1646 Clear lastCommits after fixTxOffset
Resolves #1646
```
Failed to correct transactional offset(s)
java.lang.IllegalStateException: You can only check the position for partitions assigned to this consumer.
```
It is not clear how this happened since we remove revoked partitions from `lastCommits`.
However, `lastCommits` should be cleared, even if successful, to avoid unnecessary
processing if no records are received by the next poll.
- add the `lastCommits` to the error log
- clear `lastCommits` in a finally block
**cherry-pick to 2.5.x**1 parent 3a86d8d commit ef6c115
File tree
2 files changed
+6
-1
lines changed- spring-kafka/src
- main/java/org/springframework/kafka/listener
- test/java/org/springframework/kafka/listener
2 files changed
+6
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1237 | 1237 | | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | | - | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1241 | 1245 | | |
1242 | 1246 | | |
1243 | 1247 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
| 713 | + | |
713 | 714 | | |
714 | 715 | | |
715 | 716 | | |
| |||
0 commit comments