Skip to content

Commit e949313

Browse files
authored
The master does not add the worker host if it is in the next group (#2504)
1 parent 1559bf5 commit e949313

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

elasticdl/python/master/rendezvous_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def add_worker(self, worker_host):
145145
self._next_rendezvous_hosts = copy.deepcopy(
146146
self._cur_rendezvous_hosts
147147
)
148-
self._next_rendezvous_hosts.append(worker_host)
148+
if worker_host not in self._next_rendezvous_hosts:
149+
self._next_rendezvous_hosts.append(worker_host)
149150

150151
def remove_worker(self, worker_host):
151152
with self._lock:

0 commit comments

Comments
 (0)