You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by tsutsu <gi...@git.apache.org> on 2016/02/27 02:55:15 UTC
[GitHub] couchdb-couch pull request: Add counters for lifetime total queued...
GitHub user tsutsu opened a pull request:
https://github.com/apache/couchdb-couch/pull/147
Add counters for lifetime total queued and dequeued items
This PR enables a work queue to keep a running total of all the work that's ever been added to it, queryable through the functions `total_in/1`, `total_out/1`, and `total_held/1`. Additionally, a `queue(Wq, Item, CountsAs)` function-clause has been added and exported, which enables a single queue-item to be counted as an arbitrary number of work-items from the perspective of the running total counters. This allows for the ability to track the total number of individual work-items processed, even when queuing and dequeuing are done in "chunks" of items, as is done in `couch_index_updater`.
COUCHDB-2955
BugzID: 14036
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-couch 14036-loop-updater-until-caught-up
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch/pull/147.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 #147
----
commit f4a3c74c523cb699067b9540fee895dbd3cd6ba8
Author: Levi McAuley <le...@leviaul.com>
Date: 2016-02-27T01:30:00Z
Add counters for lifetime total queued and dequeued items
----
---
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: Add counters for lifetime total queued...
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch/pull/147#issuecomment-189603566
Here need some tests to make sure that it counts right.
---
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: Add counters for lifetime total queued...
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/147#discussion_r54330255
--- Diff: src/couch_work_queue.erl ---
@@ -17,7 +17,7 @@
-include_lib("couch/include/couch_db.hrl").
% public API
--export([new/1, queue/2, dequeue/1, dequeue/2, close/1, item_count/1, size/1]).
+-export([new/1, queue/2, queue/3, dequeue/1, dequeue/2, close/1, item_count/1, size/1, total_in/1, total_out/1, total_held/1]).
--- End diff --
May be wrap this to fit 80 (at least) line right margin?
---
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.
---