Skip to content

Commit

Permalink
Wait for writer response on Refresh
Browse files Browse the repository at this point in the history
When sending a Refresh message to Writer's refresh channel,
if the state is "Succeeded" or "Failed", the Writer will update
the sync channel when finished.

Therefore there is a need to wait on sync channel on the Daemon side
when sending "Succeeded" or "Failed".

Signed-off-by: Fred Rolland <frolland@nvidia.com>
  • Loading branch information
rollandf committed Jul 10, 2022
1 parent 815fd13 commit 3fb9f6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ func (dn *Daemon) nodeStateSyncHandler(generation int64) error {
syncStatus: "Succeeded",
lastSyncError: "",
}
// wait for writer to refresh the status
<-dn.syncCh
}

return nil
Expand Down

0 comments on commit 3fb9f6d

Please sign in to comment.