Commit 0520dc4
Don't quarantine a fully-acked torn-dict slot
seedGlobalDictionaryFromPersisted walked collectReplaySymbolsAbove from
FSN 0 and threw UnreplayableSlotException on the first symbol-dictionary
gap regardless of ack state. For a recovered slot whose committed frames
were all acked -- so nothing was left to replay -- a gap in that already
delivered data still threw. (A host crash tore the unsynced side-file,
or it could not be opened, while the low segments that registered the
missing ids were trimmed away.) build() then set the slot aside as
<sender>.unreplayable-<n>, its fully-drained close deleted the delivered
bytes the quarantine promises to preserve, and it logged a false "resend
required" for data the server had already acknowledged.
That gap only matters for frames that will REPLAY. When every committed
frame has been acked (ackedFsn >= recoveredCommitBoundaryFsn), the seed
now suppresses the throw: it seeds the intact prefix only, leaving the
frame-derived symbols unused exactly as the send loop's mirror does on a
-1, so the producer baseline and the mirror's sentDictCount still agree
by construction, and resumes on the same slot. A genuine gap in UNACKED
committed frames still throws, so the real-unreplayable quarantine path
is unchanged.
Add testFullyAckedTornSlotResumesInPlaceWithoutQuarantine, the acked
counterpart to the existing unacked quarantine test: the same on-disk
tear, but with the ack watermark stamped at the last committed frame,
asserting no set-aside copy exists and the sender resumes in place. The
test fails without the production change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c0c2ce2 commit 0520dc4
2 files changed
Lines changed: 83 additions & 0 deletions
File tree
- core/src
- main/java/io/questdb/client/cutlass/qwp/client
- test/java/io/questdb/client/test/cutlass/qwp/client
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3933 | 3933 | | |
3934 | 3934 | | |
3935 | 3935 | | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
3936 | 3963 | | |
3937 | 3964 | | |
3938 | 3965 | | |
| |||
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
252 | 308 | | |
253 | 309 | | |
254 | 310 | | |
| |||
0 commit comments