Skip to content
Snippets Groups Projects
Commit 5b672a7a authored by Dixon Tirtayadi's avatar Dixon Tirtayadi
Browse files

minor update

parent f9ef13a2
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,8 @@ Write-up
kill 1
run 0
run 1
...
exit
Also, for every command done, The LockManager will print the state of locks so you can see what is the state of Locking
and check that it is consistent. For example:
......
......@@ -20,7 +20,7 @@ class LockClient():
self.sock.bind(('', 0))
self.client_addr = self.sock.getsockname()
print(f"Starting client {self.client_addr}", file=sys.stdout)
random.seed(4)
random.seed(0)
# For client timer to know whether to resend message
self.req_num = 0
......@@ -38,10 +38,6 @@ class LockClient():
self.sock.sendto(data, server_address)
setTimer(ClientTimer(paxos_req, self.req_num), ClientTimer.CLIENT_RETRY_MILLIS, self.onClientTimer)
# for server_address in server_addresses:
# print(f"Sending command {paxos_req} to {server_address}", file=sys.stdout)
# # send request to server
# sock.sendto(data, server_address)
# receive data back from the server
res = pickle.loads(self.sock.recv(1024))
......
......@@ -142,7 +142,7 @@ class Paxos(socketserver.UDPServer):
self.send_msg(p2a, acceptor)
self.accepted[slot] = BallotValuePair(BallotNumber(self.ballot.seq_num, self.address), value.value)
self.slots_to_acceptors[p2a.slot_num].add(self.address)
self.slot_to_acceptors[p2a.slot_num].add(self.address)
setTimer(P2ATimer(p2a), P2ATimer.P2A_RETRY_MILLIS, self.onP2ATimer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment