Commit 0b34a051 authored by Julien Muchembled's avatar Julien Muchembled

Use bool instead of int for 'dry_run' field in (Notify)Repair packets

parent de645092
...@@ -242,7 +242,7 @@ class TerminalNeoCTL(object): ...@@ -242,7 +242,7 @@ class TerminalNeoCTL(object):
node: if "all", ask all connected storage nodes to repair, node: if "all", ask all connected storage nodes to repair,
otherwise, only the given list of storage nodes. otherwise, only the given list of storage nodes.
""" """
dry_run = "01".index(params.pop(0)) dry_run = bool("01".index(params.pop(0)))
return self.neoctl.repair(self._getStorageList(params), dry_run) return self.neoctl.repair(self._getStorageList(params), dry_run)
def truncate(self, params): def truncate(self, params):
......
...@@ -81,13 +81,13 @@ NotifyNodeInformation(float,[(NodeTypes,?(bin,int),?int,NodeStates,?float)]) ...@@ -81,13 +81,13 @@ NotifyNodeInformation(float,[(NodeTypes,?(bin,int),?int,NodeStates,?float)])
NotifyPartitionChanges(int,int,[(int,int,CellStates)]) NotifyPartitionChanges(int,int,[(int,int,CellStates)])
NotifyPartitionCorrupted(int,[int]) NotifyPartitionCorrupted(int,[int])
NotifyReady() NotifyReady()
NotifyRepair(int) NotifyRepair(bool)
NotifyReplicationDone(int,p64) NotifyReplicationDone(int,p64)
NotifyTransactionFinished(p64,p64) NotifyTransactionFinished(p64,p64)
NotifyUnlockInformation(p64) NotifyUnlockInformation(p64)
Ping() Ping()
Pong() Pong()
Repair([int],int) Repair([int],bool)
Replicate(p64,bin,{int:?(bin,int)}) Replicate(p64,bin,{int:?(bin,int)})
RequestIdentification(NodeTypes,?int,?(bin,int),bin,?float,any,[int]) RequestIdentification(NodeTypes,?int,?(bin,int),bin,?float,any,[int])
SendPartitionTable(?int,int,[[(int,CellStates)]]) SendPartitionTable(?int,int,[[(int,CellStates)]])
......
...@@ -1502,7 +1502,7 @@ class Test(NEOThreadedTest): ...@@ -1502,7 +1502,7 @@ class Test(NEOThreadedTest):
bad.append(s.getDataLockInfo()) bad.append(s.getDataLockInfo())
s.dm.commit() s.dm.commit()
def check(dry_run, expected): def check(dry_run, expected):
cluster.neoctl.repair(node_list, dry_run) cluster.neoctl.repair(node_list, bool(dry_run))
for e, s in zip(expected, cluster.storage_list): for e, s in zip(expected, cluster.storage_list):
while 1: while 1:
self.tic() self.tic()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment