nickva commented on code in PR #5891:
URL: https://github.com/apache/couchdb/pull/5891#discussion_r2825869977


##########
src/couch_stats/src/couch_stats_util.erl:
##########
@@ -108,17 +108,7 @@ get_metric(Name, Type, Stats) when is_atom(Type), 
is_map(Stats) ->
     end.
 
 histogram_interval_sec() ->
-    case persistent_term:get(?HIST_TIME_INTERVAL_KEY, not_cached) of
-        not_cached ->
-            Time = config:get_integer("stats", "interval", 
?DEFAULT_INTERVAL_SEC),
-            persistent_term:put(?HIST_TIME_INTERVAL_KEY, Time),
-            Time;
-        Val when is_integer(Val) ->
-            Val
-    end.

Review Comment:
   We don't need to use `persistent_term` caching any longer since now config 
values are already in a persistent term. This was here since before `config` 
was switched to use that scheme.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to