Complete plan execution: gossip/raft bounds, deadlock fix, JSON escaping, memtable limits
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

Remaining plan items:
- 1.4 hybrid_search: JSON built with std/json instead of string concat
- 2.3 lsm.nim: reject oversized memtable entries
- 3.3 gossip.nim: bounds checking for idLen/nodeCount/hostLen
- 3.4 raft.nim: max length caps for cmdLen/dataLen/logLen
- 4.3 deadlock.nim: per-path seq stack instead of global parent table
This commit is contained in:
2026-05-18 11:42:46 +03:00
parent 967c0855a5
commit 47c4393a7e
5 changed files with 38 additions and 24 deletions
+2
View File
@@ -59,6 +59,8 @@ proc len*(mt: MemTable): int = mt.entries.len
proc put*(mt: var MemTable, key: string, value: seq[byte], timestamp: uint64, deleted: bool = false): bool =
let entrySize = key.len + value.len + 16
if entrySize > mt.maxSize:
return false
if mt.size + entrySize > mt.maxSize and mt.entries.len > 0:
return false
let entry = Entry(key: key, value: value, timestamp: timestamp, deleted: deleted)