Skip to content

Commit

Permalink
SIG: Avoid using path removed from path pool (#1923)
Browse files Browse the repository at this point in the history
Set the path for the worker immediately if the current path
is no longer part of the path pool.
  • Loading branch information
oncilla authored Oct 4, 2018
1 parent cbdf7af commit 83a75ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/sig/egress/session/sessmon.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ func (sm *sessMonitor) updateRemote() {
sm.Debug("Current path invalid", "remote", currRemote)
currSessPath = sm.getNewPath(nil)
sm.needUpdate = true
// Traffic must no longer be sent on the old path. This implies that the encap
// traffic is sent on a path that has not been tested by the session monitor yet.
// If the new path is unhealthy, it is changed quickly by the session monitor through
// the regular timeout mechanism above.
sm.sess.currRemote.Store(&egress.RemoteInfo{Sig: currSig, SessPath: currSessPath})
}
}
sm.sess.healthy.Store(!sm.needUpdate)
Expand Down
1 change: 1 addition & 0 deletions go/sig/egress/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func (w *worker) resetFrame(f *frame) {
if w.currSig != nil {
addrLen = uint16(spkt.AddrHdrLen(w.currSig.Host, sigcmn.Host))
}
w.currPathEntry = nil
if remote.SessPath != nil {
w.currPathEntry = remote.SessPath.PathEntry()
}
Expand Down

0 comments on commit 83a75ee

Please sign in to comment.