fix: deadlock detector, graph/query/lexer бъгове

Поправени проблеми:
- Deadlock detector: cycle reconstruction вече проверява пълен цикъл
- Graph cypher: executeCypher acquire-ва lock при четене
- Graph engine: loadFromFile acquire-ва lock при зареждане
- Graph engine: lock поле е exported за външен достъп
- Query: parseRowData поддържа escape-ване на , и = в стойности
- Query: execUpdateRow escape-ва стойности при сериализация
- Lexer: readNumber спира при втора точка (1.2.3 вече не е валиден float)
- Lexer: skipBlockComment хвърля ValueError при незатворен коментар

292 теста, 0 failure-а.
This commit is contained in:
2026-05-12 23:21:29 +03:00
parent 80d57a36bd
commit 5e585dd347
5 changed files with 55 additions and 4 deletions
+3 -1
View File
@@ -38,7 +38,7 @@ type
reverseAdj*: Table[NodeId, seq[AdjacencyEntry]] # incoming
nextNodeId: uint64
nextEdgeId: uint64
lock: Lock
lock*: Lock
proc `==`*(a, b: EdgeId): bool = uint64(a) == uint64(b)
proc `==`*(a, b: NodeId): bool = uint64(a) == uint64(b)
@@ -352,6 +352,7 @@ proc loadFromFile*(path: string): Graph =
lock: Lock(),
)
initLock(result.lock)
acquire(result.lock)
for i in 0 ..< nodeCount:
let id = NodeId(s.readUint64())
@@ -385,4 +386,5 @@ proc loadFromFile*(path: string): Graph =
result.reverseAdj[dst].add(AdjacencyEntry(edgeId: id, neighbor: src,
weight: weight, label: label))
release(result.lock)
s.close()