You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by kxepal <gi...@git.apache.org> on 2014/11/01 11:14:06 UTC

[GitHub] couchdb-couch pull request: Validate document update stats

GitHub user kxepal opened a pull request:

    https://github.com/apache/couchdb-couch/pull/13

    Validate document update stats

    This adds two new metrics about counting validation rejections and the time was spent on running vdu functions. The reason for each inside commit messages.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kxepal/couchdb-couch vdu-stats

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit 223871a41efcc4e5a63ba653410ae354df57565a
Author: Alexander Shorin <kx...@apache.org>
Date:   2014-10-30T21:40:09Z

    Track the time was spent to execute validate_doc_update function
    
    Validate document update functions are causes significant slowdown on
    request processing time when document gets modified. As more validate
    functions we have as higher delay will and the couchdb/request_time
    metric couldn't tell us why it values are so high and why our service
    is so slow. By tracking down the time spent on running all validate
    functions for each document update we could see this overhead and decide
    just in time if our validation functions are need in some optimizations.

commit 1550d0e3027281d22eb66fc0743d0b57621420d3
Author: Alexander Shorin <kx...@apache.org>
Date:   2014-10-31T19:13:19Z

    Add stats counter for validate_doc_update rejections
    
    Counting update rejections helps to answer on following questions:
    - What is the origin of so anomaly high 401/403 responses?
      We'll be able to distinguish validation errors from regular auth ones.
    - Is someone trying to do things we disallowed and how often?
      High rejection rate is a good signal to start figure out do we have
      too strict validation conditions or to start looking for bad clients.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61454117
  
    Landed as 3e32256 and be6ddf2. Thanks a lot for help on review!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705160
  
    --- Diff: src/couch_db.erl ---
    @@ -582,18 +582,27 @@ validate_ddoc(DbName, DDoc) ->
         end.
     
     validate_doc_update_int(Db, Doc, GetDiskDocFun) ->
    -    DiskDoc = GetDiskDocFun(),
    -    JsonCtx = couch_util:json_user_ctx(Db),
    -    SecObj = get_security(Db),
    -    try [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    -            ok -> ok;
    -            Error -> throw(Error)
    -        end || Fun <- Db#db.validate_doc_funs],
    -        ok
    -    catch
    -        throw:Error ->
    -            Error
    -    end.
    +    Fun = fun() ->
    +        DiskDoc = GetDiskDocFun(),
    +        JsonCtx = couch_util:json_user_ctx(Db),
    +        SecObj = get_security(Db),
    +        try
    +            [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    +                ok -> ok;
    +                Error -> throw(Error)
    +             end || Fun <- Db#db.validate_doc_funs],
    +            ok
    +        catch
    +            throw:Error ->
    +                Error
    +        end
    +    end,
    +    Begin = os:timestamp(),
    --- End diff --
    
    I'd say not in the request_time case given how much code is between start and end. here we can do `{Duration, Ret} = timer:tc(Fun)`. 
    
    I'd even go as far as adding a function for this in couch_stats (which would call timer:tc) so we could simplify this (and future such stats) to `couch_stats:update_histogram([couchdb, query_server, vd_process_time], Fun)`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705126
  
    --- Diff: src/couch_db.erl ---
    @@ -582,18 +582,27 @@ validate_ddoc(DbName, DDoc) ->
         end.
     
     validate_doc_update_int(Db, Doc, GetDiskDocFun) ->
    -    DiskDoc = GetDiskDocFun(),
    -    JsonCtx = couch_util:json_user_ctx(Db),
    -    SecObj = get_security(Db),
    -    try [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    -            ok -> ok;
    -            Error -> throw(Error)
    -        end || Fun <- Db#db.validate_doc_funs],
    -        ok
    -    catch
    -        throw:Error ->
    -            Error
    -    end.
    +    Fun = fun() ->
    +        DiskDoc = GetDiskDocFun(),
    +        JsonCtx = couch_util:json_user_ctx(Db),
    +        SecObj = get_security(Db),
    +        try
    +            [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    +                ok -> ok;
    +                Error -> throw(Error)
    +             end || Fun <- Db#db.validate_doc_funs],
    +            ok
    +        catch
    +            throw:Error ->
    +                Error
    +        end
    +    end,
    +    Begin = os:timestamp(),
    --- End diff --
    
    The same `os:timestamp` we're using for [counting `couchdb/request_time`](https://github.com/apache/couchdb-couch/blob/master/src/couch_httpd.erl#L208). Should it be also fixed?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705132
  
    --- Diff: priv/stats_descriptions.cfg ---
    @@ -182,3 +182,11 @@
         {type, counter},
         {desc, <<"number of couch_server LRU operations skipped">>}
     ]}.
    +{[couchdb, query_server, vdu_rejects], [
    +    {type, counter},
    +    {desc, <<"number of documents update rejections by validate_doc_update functions">>}
    +]}.
    +{[couchdb, query_server, vdu_process_time], [
    +    {type, histogram},
    +    {desc, <<"amount of time spent to execute validate_doc_update function">>}
    --- End diff --
    
    I'm bad in good descriptions. Thanks for both (:


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705065
  
    --- Diff: src/couch_db.erl ---
    @@ -582,18 +582,27 @@ validate_ddoc(DbName, DDoc) ->
         end.
     
     validate_doc_update_int(Db, Doc, GetDiskDocFun) ->
    -    DiskDoc = GetDiskDocFun(),
    -    JsonCtx = couch_util:json_user_ctx(Db),
    -    SecObj = get_security(Db),
    -    try [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    -            ok -> ok;
    -            Error -> throw(Error)
    -        end || Fun <- Db#db.validate_doc_funs],
    -        ok
    -    catch
    -        throw:Error ->
    -            Error
    -    end.
    +    Fun = fun() ->
    +        DiskDoc = GetDiskDocFun(),
    +        JsonCtx = couch_util:json_user_ctx(Db),
    +        SecObj = get_security(Db),
    +        try
    +            [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    +                ok -> ok;
    +                Error -> throw(Error)
    +             end || Fun <- Db#db.validate_doc_funs],
    +            ok
    +        catch
    +            throw:Error ->
    +                Error
    +        end
    +    end,
    +    Begin = os:timestamp(),
    --- End diff --
    
    suggest the standard timer:tc function.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705187
  
    --- Diff: src/couch_query_servers.erl ---
    @@ -260,15 +260,27 @@ get_number(Key, Props) ->
     validate_doc_update(DDoc, EditDoc, DiskDoc, Ctx, SecObj) ->
         JsonEditDoc = couch_doc:to_json_obj(EditDoc, [revs]),
         JsonDiskDoc = json_doc(DiskDoc),
    -    case ddoc_prompt(DDoc, [<<"validate_doc_update">>], [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]) of
    +    Resp = ddoc_prompt(DDoc,
    +                       [<<"validate_doc_update">>],
    +                       [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]),
    +    case Resp of
             1 ->
                 ok;
    -        {[{<<"forbidden">>, Message}]} ->
    -            throw({forbidden, Message});
    -        {[{<<"unauthorized">>, Message}]} ->
    -            throw({unauthorized, Message});
    -        Message when is_binary(Message) ->
    -            throw({unknown_error, Message})
    +        Else ->
    --- End diff --
    
    yes, that's the idea, though your example will crash. I suggest;
    
    `if Resp /= 1 -> couch_stats:increment_counter([couchdb, query_server, vdu_rejects], 1); true -> ok end,`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61416287
  
    I don't see why it won't work, just add another clause for update_histogram/2 which tests the second argument for `when is_function(Fun, 0)` then perform the timing (if you use timer:tc then divide by 1000 to get millis).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/13


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61417010
  
    @rnewson because [`folsom_metrics:histogram_timed_update`](https://github.com/apache/couchdb-folsom/blob/import-master/src/folsom_metrics.erl#L200) uses inside `timer:tc` and passes the result to `folsom_ets:notify` so there is no way how we could alter it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705074
  
    --- Diff: src/couch_query_servers.erl ---
    @@ -260,15 +260,27 @@ get_number(Key, Props) ->
     validate_doc_update(DDoc, EditDoc, DiskDoc, Ctx, SecObj) ->
         JsonEditDoc = couch_doc:to_json_obj(EditDoc, [revs]),
         JsonDiskDoc = json_doc(DiskDoc),
    -    case ddoc_prompt(DDoc, [<<"validate_doc_update">>], [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]) of
    +    Resp = ddoc_prompt(DDoc,
    +                       [<<"validate_doc_update">>],
    +                       [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]),
    +    case Resp of
             1 ->
                 ok;
    -        {[{<<"forbidden">>, Message}]} ->
    -            throw({forbidden, Message});
    -        {[{<<"unauthorized">>, Message}]} ->
    -            throw({unauthorized, Message});
    -        Message when is_binary(Message) ->
    -            throw({unknown_error, Message})
    +        Else ->
    --- End diff --
    
    It would reduce the diff significantly if we incremented the counter before the case statement when Resp /= 1.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705181
  
    --- Diff: src/couch_db.erl ---
    @@ -582,18 +582,27 @@ validate_ddoc(DbName, DDoc) ->
         end.
     
     validate_doc_update_int(Db, Doc, GetDiskDocFun) ->
    -    DiskDoc = GetDiskDocFun(),
    -    JsonCtx = couch_util:json_user_ctx(Db),
    -    SecObj = get_security(Db),
    -    try [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    -            ok -> ok;
    -            Error -> throw(Error)
    -        end || Fun <- Db#db.validate_doc_funs],
    -        ok
    -    catch
    -        throw:Error ->
    -            Error
    -    end.
    +    Fun = fun() ->
    +        DiskDoc = GetDiskDocFun(),
    +        JsonCtx = couch_util:json_user_ctx(Db),
    +        SecObj = get_security(Db),
    +        try
    +            [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    +                ok -> ok;
    +                Error -> throw(Error)
    +             end || Fun <- Db#db.validate_doc_funs],
    +            ok
    +        catch
    +            throw:Error ->
    +                Error
    +        end
    +    end,
    +    Begin = os:timestamp(),
    --- End diff --
    
    That's interesting - didn't know about. Will try this way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705169
  
    --- Diff: src/couch_query_servers.erl ---
    @@ -260,15 +260,27 @@ get_number(Key, Props) ->
     validate_doc_update(DDoc, EditDoc, DiskDoc, Ctx, SecObj) ->
         JsonEditDoc = couch_doc:to_json_obj(EditDoc, [revs]),
         JsonDiskDoc = json_doc(DiskDoc),
    -    case ddoc_prompt(DDoc, [<<"validate_doc_update">>], [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]) of
    +    Resp = ddoc_prompt(DDoc,
    +                       [<<"validate_doc_update">>],
    +                       [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]),
    +    case Resp of
             1 ->
                 ok;
    -        {[{<<"forbidden">>, Message}]} ->
    -            throw({forbidden, Message});
    -        {[{<<"unauthorized">>, Message}]} ->
    -            throw({unauthorized, Message});
    -        Message when is_binary(Message) ->
    -            throw({unknown_error, Message})
    +        Else ->
    --- End diff --
    
    Not sure I follow, but do you suggest to add another case before `case Resp of` like:
    ```
    case Resp of
      _ when Resp /= 1 -> couch_stats:increment_counter([couchdb, query_server, vdu_rejects], 1)
    end,
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61424353
  
    @rnewson updated with using new `update_histogram` and shorter commit messages.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61418366
  
    https://github.com/apache/couchdb-couch-stats/pull/3


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61418645
  
    Tricky one (: I wasn't sure if it's ok to have such, but if it is - good then.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705176
  
    --- Diff: src/couch_db.erl ---
    @@ -582,18 +582,27 @@ validate_ddoc(DbName, DDoc) ->
         end.
     
     validate_doc_update_int(Db, Doc, GetDiskDocFun) ->
    -    DiskDoc = GetDiskDocFun(),
    -    JsonCtx = couch_util:json_user_ctx(Db),
    -    SecObj = get_security(Db),
    -    try [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    -            ok -> ok;
    -            Error -> throw(Error)
    -        end || Fun <- Db#db.validate_doc_funs],
    -        ok
    -    catch
    -        throw:Error ->
    -            Error
    -    end.
    +    Fun = fun() ->
    +        DiskDoc = GetDiskDocFun(),
    +        JsonCtx = couch_util:json_user_ctx(Db),
    +        SecObj = get_security(Db),
    +        try
    +            [case Fun(Doc, DiskDoc, JsonCtx, SecObj) of
    +                ok -> ok;
    +                Error -> throw(Error)
    +             end || Fun <- Db#db.validate_doc_funs],
    +            ok
    +        catch
    +            throw:Error ->
    +                Error
    +        end
    +    end,
    +    Begin = os:timestamp(),
    --- End diff --
    
    Ah, nvw. I got it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61427627
  
    Fixed typo and styling space.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705058
  
    --- Diff: priv/stats_descriptions.cfg ---
    @@ -182,3 +182,11 @@
         {type, counter},
         {desc, <<"number of couch_server LRU operations skipped">>}
     ]}.
    +{[couchdb, query_server, vdu_rejects], [
    +    {type, counter},
    +    {desc, <<"number of documents update rejections by validate_doc_update functions">>}
    +]}.
    +{[couchdb, query_server, vdu_process_time], [
    +    {type, histogram},
    +    {desc, <<"amount of time spent to execute validate_doc_update function">>}
    --- End diff --
    
    'duration of validate_doc_update function calls'


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61408688
  
    @rnewson have updated code by your comments, thanks for help! Suddenly idea with `couch_stats:update_histogram([couchdb, query_server, vd_process_time], Fun)` wont work since in additional to creating proxy for `folsom_metrics:histogram_timed_update` it counts times in microseconds while everywhere else we counting time in seconds.
    
    > I also think the comments on the commits themselves need editing. They are very long and not very clear. Happy to assist with improved wording.
    
    Would be very appreciate about this! I'd tried to describe whole idea of each metric and the use case for them, but may be you right and this is redundant information for commit message.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/13#discussion_r19705053
  
    --- Diff: priv/stats_descriptions.cfg ---
    @@ -182,3 +182,11 @@
         {type, counter},
         {desc, <<"number of couch_server LRU operations skipped">>}
     ]}.
    +{[couchdb, query_server, vdu_rejects], [
    +    {type, counter},
    +    {desc, <<"number of documents update rejections by validate_doc_update functions">>}
    --- End diff --
    
    'number of rejections by validate_doc_update function'


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61428290
  
    +1
    
    Sent from my iPhone
    
    > On 2 Nov 2014, at 22:47, Alexander Shorin <no...@github.com> wrote:
    > 
    > Fixed typo and styling space.
    > 
    > —
    > Reply to this email directly or view it on GitHub.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61372852
  
    +1 to the code changes after addressing my comments, I also think the comments on the commits themselves need editing. They are very long and not very clear. Happy to assist with improved wording.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Validate document update stats

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/13#issuecomment-61416361
  
    For the descriptions in the comments, I suggest only;
    
    "Count the number of rejections by validate_doc_update functions"
    
    and
    
    "Track the time spent executing validate_doc_update functions"
    
    The user-facing documentation will be in docs/, not commit text. The commit text just describes the change; it's something we compare against the code to evaluate intention.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---