You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2024/02/12 23:36:18 UTC

(couchdb) 17/28: WIP: relax record constraints...

This is an automated email from the ASF dual-hosted git repository.

chewbranca pushed a commit to branch couch-stats-resource-tracker-rebase
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 335f096b9541b7d4e7c4bea4d9c5bac04ce5ce6b
Author: Russell Branca <ch...@apache.org>
AuthorDate: Mon Nov 20 16:34:11 2023 -0800

    WIP: relax record constraints...
---
 src/couch_stats/src/couch_stats_resource_tracker.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/couch_stats/src/couch_stats_resource_tracker.erl b/src/couch_stats/src/couch_stats_resource_tracker.erl
index 22610c722..59d2a9de3 100644
--- a/src/couch_stats/src/couch_stats_resource_tracker.erl
+++ b/src/couch_stats/src/couch_stats_resource_tracker.erl
@@ -903,7 +903,8 @@ handle_info({'DOWN', MonRef, _Type, DPid, Reason}, #st{tracking=AT0} = St0) ->
             %% TODO: Assert Pid matches Object
             %% update process state in live table
             %% TODO: decide whether we want the true match to crash this process on failure
-            true = ets:update_element(?MODULE, PidRef,
+            %% true = ets:update_element(?MODULE, PidRef,
+            ets:update_element(?MODULE, PidRef,
                 [{#rctx.state, {down, Reason}}, {#rctx.updated_at, os:timestamp()}]),
             log_process_lifetime_report(PidRef),
             %% Delay eviction to allow human visibility on short lived pids
@@ -935,7 +936,8 @@ maybe_track([{Pid,_Ref} = PidRef | PidRefs], AT) ->
         false -> %% setup new monitor and double bookkeep refs
             Mon = erlang:monitor(process, Pid),
             %% TODO: decide whether we want the true match to crash this process on failure
-            true = ets:update_element(?MODULE, PidRef, [{#rctx.mon_ref, Mon}]),
+            %%true = ets:update_element(?MODULE, PidRef, [{#rctx.mon_ref, Mon}]),
+            ets:update_element(?MODULE, PidRef, [{#rctx.mon_ref, Mon}]),
             maps:put(Mon, PidRef, maps:put(PidRef, Mon, AT))
     end,
     maybe_track(PidRefs, AT1).