This is an automated email from the ASF dual-hosted git repository.
nickva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new 39963bf98 Fix scanner backoff logic
39963bf98 is described below
commit 39963bf9805964ed2f6f14c2669aa25392379a52
Author: Nick Vatamaniuc <[email protected]>
AuthorDate: Mon Sep 28 15:23:39 2026 -0400
Fix scanner backoff logic
It was inverted before. We want to "forgive it" if it worked fine a while
so we
want the Now-Start to to be greater than our heal interval.
---
src/couch_scanner/src/couch_scanner_server.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/couch_scanner/src/couch_scanner_server.erl
b/src/couch_scanner/src/couch_scanner_server.erl
index ecb7e73f0..6bd6ef39f 100644
--- a/src/couch_scanner/src/couch_scanner_server.erl
+++ b/src/couch_scanner/src/couch_scanner_server.erl
@@ -266,7 +266,7 @@ sched_exit_update(Id, #sched{} = Sched, Error) ->
Now = tsec(),
% If process has been running successfully for a while without crashing
% reset (forgive) its previous errors.
- case Now - Start =< heal_threshold_sec() of
+ case Now - Start > heal_threshold_sec() of
true -> penalize(Now, Sched1#sched{error_count = 1});
false -> penalize(Now, Sched1#sched{error_count = ErrorCount + 1})
end.