Skip to content

Commit 665a036

Browse files
committed
fix: don't retry broadcast
Retrying a broadcast can result in sending multiple broadcast messages to a worker because we don't differntiate between succesful sends and not. We shouldn't do a retry here. Instead the retries on getting a connection to a worker have been increased. In the future, we should handle the retry from the scheduler.
1 parent 50bde32 commit 665a036

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

crates/worker/src/executor/parameter_server.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,18 +340,12 @@ impl JobExecutor for ParameterServerExecutor {
340340
}
341341
};
342342

343-
match Retry::spawn(retry_strategy.clone(), || {
344-
let connector = connector.clone();
345-
let send = send.clone();
346-
let cancel = cancel.clone();
347-
async move { broadcast_update(
343+
match broadcast_update(
348344
connector.clone(),
349345
send,
350346
gradient_file,
351-
cancel.clone(),
347+
cancel.clone()
352348
).await
353-
}
354-
}).await
355349
{
356350
Ok(()) => {
357351
pending_update = None;

0 commit comments

Comments
 (0)