Stabilization: replication semi-sync, MVCC aborted deleters, SSTable level, SCRAM fix
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled

P0-P1 fixes:
- replication.nim: rmSync/rmSemiSync now wait for replica ACKs
- mvcc.nim: aborted deleters no longer hide records (return true for visibility)
- storage/lsm.nim: SSTable level persisted in header (version 2, backward compat)
- protocol/auth.nim: removed insecure SCRAM raw hash fallback

Build: 0 warnings, 0 errors. All tests pass.
This commit is contained in:
2026-05-18 12:04:45 +03:00
parent 47c4393a7e
commit 8596cea548
4 changed files with 37 additions and 16 deletions
+15 -2
View File
@@ -134,8 +134,14 @@ proc writeLsn*(rm: ReplicationManager, data: seq[byte]): uint64 =
for replica in replicasToShip:
rm.pendingAcks[lsn].incl(replica.id)
release(rm.lock)
var ackCount = 0
for replica in replicasToShip:
discard shipToReplica(replica, lsn, data)
if shipToReplica(replica, lsn, data):
inc ackCount
if replicasToShip.len > 0 and ackCount < replicasToShip.len:
# Not all replicas acked — log but still return LSN (caller decides)
when defined(debug):
echo "Replication sync: only ", ackCount, "/", replicasToShip.len, " replicas acked for LSN ", lsn
return lsn
of rmSemiSync:
if replicasToShip.len > 0:
@@ -146,8 +152,15 @@ proc writeLsn*(rm: ReplicationManager, data: seq[byte]): uint64 =
rm.pendingAcks[lsn].incl(replica.id)
inc count
release(rm.lock)
var ackCount = 0
for replica in replicasToShip:
discard shipToReplica(replica, lsn, data)
if shipToReplica(replica, lsn, data):
inc ackCount
if ackCount >= rm.syncReplicaCount:
break
if replicasToShip.len > 0 and ackCount == 0 and rm.syncReplicaCount > 0:
when defined(debug):
echo "Replication semi-sync: no replicas acked for LSN ", lsn
return lsn
proc ackLsn*(rm: ReplicationManager, replicaId: string, lsn: uint64) =