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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user