summaryrefslogtreecommitdiff
path: root/src/couch
diff options
context:
space:
mode:
authorWill Holley <willholley@gmail.com>2020-01-06 13:22:07 +0000
committerWill Holley <willholley@gmail.com>2020-01-17 13:54:34 +0000
commit5d55e289760959eb2fc228acb2ed00d57ddd4dee (patch)
tree2918556fee71003641ddcb96a5c8c5ee59c812a7 /src/couch
parentb5fe3d69271813ac5aa7966b60eb2e94947a0606 (diff)
downloadcouchdb-5d55e289760959eb2fc228acb2ed00d57ddd4dee.tar.gz
Warn on mango index scan
Adds a warning to the _find endpoint if the ratio of docs scanned: results returned is higher than a configurable threshold (default 10). This warning was previously generated in Fauxton; moving it to the server side allows us to expose it via _stats as well.
Diffstat (limited to 'src/couch')
-rw-r--r--src/couch/priv/stats_descriptions.cfg4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/couch/priv/stats_descriptions.cfg b/src/couch/priv/stats_descriptions.cfg
index 0d81ea31b..557ac36b8 100644
--- a/src/couch/priv/stats_descriptions.cfg
+++ b/src/couch/priv/stats_descriptions.cfg
@@ -306,3 +306,7 @@
{type, counter},
{desc, <<"number of mango queries that generated an invalid index warning">>}
]}.
+{[mango, too_many_docs_scanned], [
+ {type, counter},
+ {desc, <<"number of mango queries that generated an index scan warning">>}
+]}.