mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Skip enabling direct gets if no commits
Signed-off-by: Waldemar Quevedo <wally@nats.io>
This commit is contained in:
@@ -2423,6 +2423,10 @@ func (js *jetStream) monitorStream(mset *stream, sa *streamAssignment, sendSnaps
|
||||
// We are not current, but current means exactly caught up. Under heavy publish
|
||||
// loads we may never reach this, so check if we are within 90% caught up.
|
||||
_, c, a := mset.node.Progress()
|
||||
if c == 0 {
|
||||
mset.mu.Unlock()
|
||||
continue
|
||||
}
|
||||
if p := float64(a) / float64(c) * 100.0; p < syncThreshold {
|
||||
mset.mu.Unlock()
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user