You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2020/01/04 12:02:40 UTC

[couchdb] branch feat/metric-unindexed-mango created (now 325f189)

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

jan pushed a change to branch feat/metric-unindexed-mango
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 325f189  feat: add metric counter for unindexed mango queries. Closes #1913

This branch includes the following new commits:

     new 325f189  feat: add metric counter for unindexed mango queries. Closes #1913

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.



[couchdb] 01/01: feat: add metric counter for unindexed mango queries. Closes #1913

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

jan pushed a commit to branch feat/metric-unindexed-mango
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 325f18952aac5f46e0cc3e4ebe87dd5e8ad1fc8f
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Sat Jan 4 13:02:22 2020 +0100

    feat: add metric counter for unindexed mango queries. Closes #1913
---
 src/couch/priv/stats_descriptions.cfg | 4 ++++
 src/mango/src/mango_cursor.erl        | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/couch/priv/stats_descriptions.cfg b/src/couch/priv/stats_descriptions.cfg
index 0e22713..ae203bb 100644
--- a/src/couch/priv/stats_descriptions.cfg
+++ b/src/couch/priv/stats_descriptions.cfg
@@ -298,3 +298,7 @@
     {type, counter},
     {desc, <<"number of the attempts to read beyond set limit">>}
 ]}.
+{[mango, unindexed_queries], [
+    {type, counter},
+    {desc, <<"number of mango queries that could not use an index">>}
+]}.
diff --git a/src/mango/src/mango_cursor.erl b/src/mango/src/mango_cursor.erl
index c6f21dd..dc2ee74 100644
--- a/src/mango/src/mango_cursor.erl
+++ b/src/mango/src/mango_cursor.erl
@@ -182,6 +182,7 @@ maybe_add_warning_int(ok, _, UserAcc) ->
    UserAcc;
 
 maybe_add_warning_int(Warning, UserFun, UserAcc) ->
+    couch_stats:increment_counter([mango, unindexed_queries]),
     Arg = {add_key, warning, Warning},
     {_Go, UserAcc0} = UserFun(Arg, UserAcc),
     UserAcc0.