Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIG: Avoid using path removed from path pool #1923

Merged
merged 2 commits into from
Oct 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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