You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2023/04/05 13:14:14 UTC

[couchdb] branch dreyfus_active_searhes updated (93e3ac5f4 -> 8899157d7)

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

rnewson pushed a change to branch dreyfus_active_searhes
in repository https://gitbox.apache.org/repos/asf/couchdb.git


 discard 93e3ac5f4 track active search requests
     new 8899157d7 track active search requests

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (93e3ac5f4)
            \
             N -- N -- N   refs/heads/dreyfus_active_searhes (8899157d7)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/dreyfus/priv/stats_descriptions.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[couchdb] 01/01: track active search requests

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch dreyfus_active_searhes
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 8899157d7ec80816c5d502436289de9a61edd67a
Author: Robert Newson <rn...@apache.org>
AuthorDate: Tue Apr 4 20:54:30 2023 +0100

    track active search requests
---
 src/dreyfus/priv/stats_descriptions.cfg | 5 +++++
 src/dreyfus/src/dreyfus_httpd.erl       | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/dreyfus/priv/stats_descriptions.cfg b/src/dreyfus/priv/stats_descriptions.cfg
index 7f93ee26a..8183a4f9a 100644
--- a/src/dreyfus/priv/stats_descriptions.cfg
+++ b/src/dreyfus/priv/stats_descriptions.cfg
@@ -63,3 +63,8 @@
     {type, counter},
     {desc, <<"Search IO directly triggered by client requests">>}
 ]}.
+
+{[dreyfus, active_searches], [
+    {type, counter},
+    {desc, <<"number of active search requests">>}
+]}.
\ No newline at end of file
diff --git a/src/dreyfus/src/dreyfus_httpd.erl b/src/dreyfus/src/dreyfus_httpd.erl
index f6607d644..3bf2522fd 100644
--- a/src/dreyfus/src/dreyfus_httpd.erl
+++ b/src/dreyfus/src/dreyfus_httpd.erl
@@ -31,7 +31,12 @@
 ]).
 
 handle_search_req(Req, Db, DDoc) ->
-    handle_search_req(Req, Db, DDoc, 0, 500).
+    couch_stats:increment_counter([dreyfus, active_searches]),
+    try
+        handle_search_req(Req, Db, DDoc, 0, 500)
+    after
+        couch_stats:decrement_counter([dreyfus, active_searches])
+    end.
 
 handle_search_req(
     #httpd{method = Method, path_parts = [_, _, _, _, IndexName]} = Req,