Repository navigation
Commit 94c442f
committed
Fix the consumer race in spring-kafka-2.3.x-scenario
The scenario consumer has no committed offset and starts from the latest
offset, while healthCheck reported success as soon as Tomcat started. When the
health check hit right after startup, the entry request sent "helloWorld"
before the consumer got its partition, so the consumer skipped it, the
request waited forever on the latch and its segment was never reported
(SegmentNotFoundException for GET:/case/spring-kafka-case). On ubuntu-26.04
runners spring-kafka 2.7.14 lost this race on every attempt.
Report healthy only after partitions are assigned, the same way
kafka-scenario does.1 parent 63a9c97 commit 94c442f
1 file changed
Lines changed: 21 additions & 1 deletion
File tree
- test/plugin/scenarios/spring-kafka-2.3.x-scenario/src/main/java/test/apache/skywalking/apm/testcase/spring/kafka/controller
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| |||
153 | 170 | | |
154 | 171 | | |
155 | 172 | | |
156 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
157 | 177 | | |
158 | 178 | | |
159 | 179 | | |
0 commit comments