couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson (JIRA)" <>
Subject [jira] Commented: (COUCHDB-791) Changes not written if server shutdown during delayed_commits period
Date Thu, 10 Jun 2010 14:18:14 GMT


Chris Anderson commented on COUCHDB-791:

We even have a test that the last second of updates are lost here:

I'm wary of introducing the concept of a normal shutdown. How often do you shutdown a live
server? I'm guessing it's something you have never done. Servers go down because they run
out of memory, or get struck by lightning.

Outside of your test scenario, it is hard to see when a server under load would ever be shutdown
cleanly. Which is why it doesn't make sense to have a clean shutdown mode.

It is trivial to configure couchdb to force a commit for every write, and as I mentioned before,
under concurrent load, it is much faster. Under single user load it is dog slow (10-ish writes
per second) which is why we ship with delayed_commits on by default.

I think couchdb -d is just a shell script, so if it called /_ensure_full_commit before it
kills the pid, that'd be OK. But core CouchDB shouldn't have shutdown code in it.

> Changes not written if server shutdown during delayed_commits period
> --------------------------------------------------------------------
>                 Key: COUCHDB-791
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.11.1
>         Environment: Linux (Ubuntu 10.04)
>            Reporter: Matt Goodall
> If the couchdb server is shutdown (couchdb -d, Ctrl+C at the console, etc) during the
delayed commits period then buffered updates are lost.
> Simple script to demonstrate the problem is:
> db=http://localhost:5984/scratch
> curl $db -X DELETE
> curl $db -X PUT
> curl $db -X POST -d '{}'
> /path/to/couchdb/bin/couchdb -d
> When couchdb is started again the database is empty.
> Affects 0.11.x and trunk branches.

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

View raw message