couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kowsik <>
Subject Re: Long running task status monitoring
Date Fri, 23 Jan 2009 05:41:09 GMT
Neat! If there's one thing that I'm constantly worried about on a
write heavy site, it's compaction. The file sizes do grow pretty
rapidly because of append-only-write nature of Couch. Knowing the
status can help the rest of app throttle itself if necessary.

One suggestion though, instead of preformatting the status, can you
emit actual json objects instead?

For example:

status: {
    total: 39001,
    current: 10001

and so on which makes it machine parsable. Otherwise the caller has to
resort to regex magic which is just painful.



On Thu, Jan 22, 2009 at 8:18 PM, Damien Katz <> wrote:
> I just checked in code to allow the checking of the status of long running
> tasks, like view indexes and compaction.
> During a long view build or compaction, if you want to see the status of
> what's happening, simply GET _active_tasks and you'll get back a list of
> JSON objects describing the currently running tasks.
> Example results while 2 tasks are running:
> [{"type":"Database Compaction","task":"speed","status":"Copied 10001 of
> 39001 changes (25%)","pid":"<0.78.0>"},
> {"type":"View Group Indexer","task":"speed _design/test","status":"Processed
> 0 of 39001 changes (0%)","pid":"<0.91.0>"}]
> We should probably add task tracking code for replication as well.
> -Damien

View raw message