diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2021-03-01 15:51:30 -0500 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2021-03-11 13:13:03 -0500 |
commit | 5371efa797b427b1ae67a0c4cbeb372c5637b800 (patch) | |
tree | 434abf740d591d303724b3d416ecbd9711fc4053 | |
parent | ab38c2dd3f429ce8f347fa4f04e2815b810a8a19 (diff) | |
download | couchdb-5371efa797b427b1ae67a0c4cbeb372c5637b800.tar.gz |
[fixup] Use =< when clearing 0 entries from priority and usage tables
-rw-r--r-- | src/couch_replicator/src/couch_replicator_share.erl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/couch_replicator/src/couch_replicator_share.erl b/src/couch_replicator/src/couch_replicator_share.erl index 1f5d00cf3..c1e52b2b8 100644 --- a/src/couch_replicator/src/couch_replicator_share.erl +++ b/src/couch_replicator/src/couch_replicator_share.erl @@ -265,10 +265,7 @@ decay(Ets, Coeff) when is_atom(Ets) -> clear_zero(Ets) when is_atom(Ets) -> - % Coefficents bound to the [0.0, 1.0] range, and the `trunc` call in - % decay/2 ensures we can directly match on 0, as opposed needing to do =< 0 - % with a guard. - ets:select_delete(Ets, [{{'_', 0}, [], [true]}]). + ets:select_delete(Ets, [{{'_', '$1'}, [{'=<', '$1', 0}], [true]}]). key(#job{} = Job) -> |