Skip to content

Commit 71cfbe2

Browse files
committed
fix(qwp): restore requestSyncBeforeRotation gate clobbered by stray edit
Commit 88d6b79 accidentally captured a concurrent tooling edit that neutralized requestSyncBeforeRotation to 'return false' (marked 'MUTANT: gate neutralized'): a mutation-testing session shared this worktree and injected the edit between test validation and git add. The neutralized gate allowed rotation in PERIODIC durability mode to proceed without requesting a sync for a predecessor whose published range was not yet durable. This restores the original logic byte-for-byte; the worktree now matches exactly the change set the 369-test sf suite validated. SegmentManagerPeriodicSyncTest, SegmentManagerCrashConsistencyTest, SegmentRingTest and MmapSegmentTest re-run green on the restoration.
1 parent 88d6b79 commit 71cfbe2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor

core/src/main/java/io/questdb/client/cutlass/qwp/client/sf/cursor/SegmentRing.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,11 @@ public synchronized void releasePinnedSegmentForTest(MmapSegment expected) {
13421342
}
13431343

13441344
private synchronized boolean requestSyncBeforeRotation(MmapSegment previous) {
1345-
return false; // MUTANT: gate neutralized
1345+
if (periodicSyncEnabled && !previous.isPublishedDurable()) {
1346+
syncRequested = true;
1347+
return true;
1348+
}
1349+
return false;
13461350
}
13471351

13481352
/** Releases the I/O cursor pin and wakes trim if it still names {@code expected}. */

0 commit comments

Comments
 (0)