fix: distributed transaction and sharding bugs

- disttxn: rollback now correctly updates participant state (was modifying a copy)
- disttxn: bare except replaced with CatchableError
- sharding: migrateData condition was always false, now correctly migrates data
- sharding: unsafe cast[string] replaced with manual byte-to-char conversion
- sharding: bare except replaced with CatchableError
- server: parseUInt replaced with parseBiggestUint for uint64 portability
This commit is contained in:
2026-05-13 14:01:13 +03:00
parent 45849cbe5c
commit 42c675224c
3 changed files with 12 additions and 15 deletions
+1 -1
View File
@@ -326,7 +326,7 @@ proc handleClient(server: Server, client: AsyncSocket, clientId: int) {.async.}
rest.add(more)
let parts = rest.strip().split(" ")
if parts.len >= 2:
let txnId = try: parseUInt(parts[0]) except: 0'u64
let txnId = try: uint64(parseBiggestUint(parts[0])) except: 0'u64
let action = parts[1].toUpper()
if server.distTxnManager != nil:
let txn = server.distTxnManager.getTxn(txnId)