couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Candler (JIRA)" <j...@apache.org>
Subject [jira] Created: (COUCHDB-454) batch=ok buffers indefinitely
Date Thu, 06 Aug 2009 08:23:14 GMT
batch=ok buffers indefinitely
-----------------------------

                 Key: COUCHDB-454
                 URL: https://issues.apache.org/jira/browse/COUCHDB-454
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
         Environment: CouchDB HEAD (commit commit aebdb31001126dab6b579b8cc2e605ef7ec499c6)
Ubuntu Jaunty, Erlang 12B5
            Reporter: Brian Candler


It appears that documents written with batch=ok are buffered indefinitely. They don't appear
in the _changes feed, nor in _all_docs, until you POST to _ensure_full_commit. This is despite
me running with standard default.ini which has batch_save_interval=1000 (milliseconds)

$ curl -X DELETE http://127.0.0.1:5984/test
{"ok":true}
$ curl -X PUT http://127.0.0.1:5984/test
{"ok":true}
$ curl -X POST -d'{}' http://127.0.0.1:5984/test
{"ok":true,"id":"1b1337e31c4d9b41119d51db78ffebe3","rev":"1-967a00dff5e02add41819138abb3284d"}
$ curl http://127.0.0.1:5984/test/_all_docs
{"total_rows":1,"offset":0,"rows":[
{"id":"1b1337e31c4d9b41119d51db78ffebe3","key":"1b1337e31c4d9b41119d51db78ffebe3","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
]}
$ curl -X POST -d'{}' http://127.0.0.1:5984/test?batch=ok
{"ok":true,"id":"ba37caf17a24236d243e9ab2c4c6daff"}
$ curl -X POST -d'{}' http://127.0.0.1:5984/test?batch=ok
{"ok":true,"id":"e5d8bb7c74ca3cca4aabea8107620fad"}
$ curl -X POST -d'{}' http://127.0.0.1:5984/test?batch=ok
{"ok":true,"id":"9bb2fb958f9112d79b4f388514c0ba7c"}
$ curl http://127.0.0.1:5984/test/_all_docs
{"total_rows":1,"offset":0,"rows":[
{"id":"1b1337e31c4d9b41119d51db78ffebe3","key":"1b1337e31c4d9b41119d51db78ffebe3","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
]}
$ sleep 60
$ curl http://127.0.0.1:5984/test/_all_docs
{"total_rows":1,"offset":0,"rows":[
{"id":"1b1337e31c4d9b41119d51db78ffebe3","key":"1b1337e31c4d9b41119d51db78ffebe3","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
]}
$ curl -X POST http://127.0.0.1:5984/test/_ensure_full_commit
{"ok":true,"instance_start_time":"1249546668867264"}
$ curl http://127.0.0.1:5984/test/_all_docs
{"total_rows":4,"offset":0,"rows":[
{"id":"1b1337e31c4d9b41119d51db78ffebe3","key":"1b1337e31c4d9b41119d51db78ffebe3","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
{"id":"9bb2fb958f9112d79b4f388514c0ba7c","key":"9bb2fb958f9112d79b4f388514c0ba7c","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
{"id":"ba37caf17a24236d243e9ab2c4c6daff","key":"ba37caf17a24236d243e9ab2c4c6daff","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
{"id":"e5d8bb7c74ca3cca4aabea8107620fad","key":"e5d8bb7c74ca3cca4aabea8107620fad","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
]}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message