incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Johnson <ejohnso...@gmail.com>
Subject _revs_limit and _compact in 0.11
Date Tue, 08 Jun 2010 15:24:57 GMT
Hi all,

I'm beginning to get familiar with the administrative functions of couchdb 0.11
and had a question about rev limits and compaction.  In my testing it seems
rev limits are being reset to the default 1000 after I run _compact, even
though the wiki states otherwise:

"_revs_limit defines a upper bound of document revisions which CouchDB keeps 
track of, even after Compaction"
http://wiki.apache.org/couchdb/HTTP_database_API#Accessing_Database-specific_options

For instance if I run the following series of curl commands that create a new 
db,set the revs limit, get the revs limit, run compact, and get the revs limit 
again I see that the revs limit gets reset.

Searching jira for "_revs_limit" doesn't return any results,  so if anyone could 
shed any light on the subject for me I would greatly appreciate it.

Thank you,

Erick Johnson

curl and server logs follow....

$ curl -XPUT http://erick:foobar@127.0.0.40:5984/testing-compaction
{"ok":true}
$ curl -XPUT http://erick:foobar@127.0.0.40:5984/testing-compaction/_revs_limit 
-d "100"
{"ok":true}
$ curl http://erick:foobar@127.0.0.40:5984/testing-compaction/_revs_limit
100
$ curl -XPOST http://erick:foobar@127.0.0.40:5984/testing-compaction/_compact
{"ok":true}
$ curl http://erick:foobar@127.0.0.40:5984/testing-compaction/_revs_limit
1000

The associated debug level server logs are as follows:

[debug] [<0.207.0>] 'PUT' /testing-compaction {1,1}
Headers: [{'Accept',"*/*"},
           {'Authorization',"Basic ZXJpY2s6Zm9vYmFy"},
           {'Host',"127.0.0.40:5984"},
           {'User-Agent',"curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
[debug] [<0.207.0>] OAuth Params: []
[info] [<0.207.0>] 127.0.0.40 - - 'PUT' /testing-compaction 201
[debug] [<0.214.0>] 'PUT' /testing-compaction/_revs_limit {1,1}
Headers: [{'Accept',"*/*"},
           {'Authorization',"Basic ZXJpY2s6Zm9vYmFy"},
           {'Content-Length',"3"},
           {'Content-Type',"application/x-www-form-urlencoded"},
           {'Host',"127.0.0.40:5984"},
           {'User-Agent',"curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
[debug] [<0.214.0>] OAuth Params: []
[info] [<0.214.0>] 127.0.0.40 - - 'PUT' /testing-compaction/_revs_limit 200
[debug] [<0.227.0>] 'GET' /testing-compaction/_revs_limit {1,1}
Headers: [{'Accept',"*/*"},
           {'Authorization',"Basic ZXJpY2s6Zm9vYmFy"},
           {'Host',"127.0.0.40:5984"},
           {'User-Agent',"curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
[debug] [<0.227.0>] OAuth Params: []
[info] [<0.227.0>] 127.0.0.40 - - 'GET' /testing-compaction/_revs_limit 200
[debug] [<0.246.0>] 'POST' /testing-compaction/_compact {1,1}
Headers: [{'Accept',"*/*"},
           {'Authorization',"Basic ZXJpY2s6Zm9vYmFy"},
           {'Host',"127.0.0.40:5984"},
           {'User-Agent',"curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
[debug] [<0.246.0>] OAuth Params: []
[info] [<0.218.0>] Starting compaction for db "testing-compaction"
[info] [<0.246.0>] 127.0.0.40 - - 'POST' /testing-compaction/_compact 202
[debug] [<0.269.0>] Compaction process spawned for db "testing-compaction"
[debug] [<0.80.0>] New task status for testing-compaction: Flushing
[debug] [<0.218.0>] CouchDB swapping files 
/home/erick/local/var/lib/couchdb/testing-compaction.couch and 
/home/erick/local/var/lib/couchdb/testing-compaction.couch.compact.
[info] [<0.218.0>] Compaction for db "testing-compaction" completed.
[debug] [<0.268.0>] 'GET' /testing-compaction/_revs_limit {1,1}
Headers: [{'Accept',"*/*"},
           {'Authorization',"Basic ZXJpY2s6Zm9vYmFy"},
           {'Host',"127.0.0.40:5984"},
           {'User-Agent',"curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
[debug] [<0.268.0>] OAuth Params: []
[info] [<0.268.0>] 127.0.0.40 - - 'GET' /testing-compaction/_revs_limit 200

Mime
View raw message