couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wayne Conrad <wa...@databill.com>
Subject Re: Using the API to tell if a compact has been done
Date Mon, 24 Jan 2011 19:05:16 GMT
Paul, Thanks for the suggestions.  Comments interleaved with your reply.

On 01/24/11 11:20, Paul Davis wrote:
> Later versions include an entry in the db info blob whether compaction
> is running. Though you may still get into a bit of a race condition if
> compaction finishes faster than you can make the second request.
>    

That wouldn't be good.  A test failure could be because the program 
failed, or because the race condition occured.  Not too reliable.

> Though the return value of the compaction request should also tell you
> if it's started successfully.
>    

Testing the record code is good (and ought to be done), but it doesn't 
provide direct evidence that compaction was requested, and allows some 
failures to go undetected by the test (such as the program not making 
the request at all).

By the way, the couchdb database that the program-under-test is being 
run against is created just for the duration of the test and destroyed 
thereafter, so I can do anything at all to it that might help.  I can 
give it a special or abnormal configuration, for example.  In the 
config, under http_global_handers, I see there's a _replicate entry that 
is set to  {couch_httpd_misc_handlers, handle_replicate_req}.  Is it 
possible for me to set that to my own handler that might just, for 
example, create or update some document that my test can query to find 
out if replication was requested?

Thanks,
Wayne Conrad


Mime
View raw message