Commit 958a36d
committed
fix(qwp): clear transient sync latch, unpin startup recovery, capture win32 errno at failure point
Review-finding fixes:
- C1: SegmentManager.servicePeriodicSync now clears
SegmentRing.durabilityFailure after a subsequent fully-successful sync
pass, so a transient fsync/msync failure no longer permanently bricks
the producer; recovery is logged like the trim path. Regression test:
testTransientSyncFailureClearsOnNextSuccess.
- C2: startup SF recovery parks slots whose build persistently fails
(immediately on SlotLockContentionException, after 3 consecutive
failures otherwise), keeps scanning the remaining slots, rewinds the
cursors while parked slots remain, and dedups the per-slot WARN. A
wedged slot no longer livelocks the driver, floods the log, or starves
higher slots' orphan data; the server-wide transient retry contract is
preserved. 3 new regression tests in SenderPoolSfTest.
- M1: windows open_file saves GetLastError() at the CreateFileW failure
point (before free() can clobber it) and fsyncDir0 classifies the
ERROR_ACCESS_DENIED best-effort degrade from the saved value via the
new GetSavedLastError() (defined in os.c beside the TLS index it
reads), mirroring the FlushFileBuffers branch's capture pattern.
- M2: replaced leftover test reflection with the existing @testonly
seams in CursorSendEngineSlotReacquisitionTest,
QueryClientPoolErrorSafetyTest and SlotLockReleasedContractTest.
- Stale comments updated: the durability-latch throw is transient, and
the recovery streak constant parks on the 3rd consecutive failure.1 parent 80ad4ca commit 958a36d
12 files changed
Lines changed: 536 additions & 83 deletions
File tree
- core/src
- main
- c/windows
- java/io/questdb/client
- cutlass/qwp/client
- sf/cursor
- impl
- test/java/io/questdb/client/test
- cutlass/qwp/client
- sf/cursor
- impl
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| |||
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
244 | 251 | | |
245 | 252 | | |
246 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
873 | | - | |
874 | | - | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
875 | 877 | | |
876 | 878 | | |
877 | 879 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
1227 | 1231 | | |
1228 | | - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1229 | 1236 | | |
1230 | 1237 | | |
1231 | 1238 | | |
| |||
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
961 | 963 | | |
962 | 964 | | |
963 | 965 | | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
964 | 982 | | |
965 | 983 | | |
966 | 984 | | |
| |||
0 commit comments