Commit 1551963
Apply review fixes: degrade highwater offset collection gracefully
Mirror cluster_metadata.fetch_earliest_offsets in get_partition_offsets:
broaden the per-future handler to catch any Exception so one bad
partition does not abort the loop, and wrap the outer list_offsets
call so a request/broker-level failure logs a warning and returns []
instead of aborting the whole highwater collection.
Strengthen unit tests: assert list_offsets is called with
isolation_level=READ_UNCOMMITTED and the request timeout, cover the
non-Kafka per-partition error and request-level failure paths, and add
an empty-partitions test that issues no request.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent bfad118 commit 1551963
2 files changed
Lines changed: 64 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | | - | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
1096 | 1145 | | |
1097 | 1146 | | |
1098 | | - | |
| 1147 | + | |
1099 | 1148 | | |
1100 | 1149 | | |
1101 | 1150 | | |
| |||
1113 | 1162 | | |
1114 | 1163 | | |
1115 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
0 commit comments