1
0
Fork 0

Clearer logic

master
Philip O'Toole 7 months ago
parent e13aab8537
commit d92c0d1fda

@ -1800,10 +1800,10 @@ func (s *Store) isStaleRead(freshness, maxStale int64) bool {
if maxStale == 0 {
return false
}
if s.fsmIdx.Load() < s.raft.CommitIndex() && s.fsmUpdateTime.Sub(s.appendedAtTime).Nanoseconds() > maxStale {
return true
if s.fsmIdx.Load() == s.raft.CommitIndex() {
return false
}
return false
return s.fsmUpdateTime.Sub(s.appendedAtTime).Nanoseconds() > maxStale
}
type fsmExecuteResponse struct {

Loading…
Cancel
Save