This reverts commit 8d6f71e.
Changes connections are generally long-lived conections, keeping them in the pool limit the number of concurrent connections. This change fix it by removing them from the ranch connection ssupervisor once the changes connections are accepted.
couchdb has a tendancy to exit from anywhere (old mochiweb design). Make sure we can really recover from crashes by returning ok when it happen. We still have some logs due to ranch but that better than the old situation. side note: we are now based on latest stable branch of ranch.
This reverts the compaction task status progress back to what exists on 1.2.x. The issue is that we use the number of documents in the database instead of the number of docids in the union of all views (the number of rows in the view's id btree). In this particular case the desire to have seamless view upgrades outweighs fixing the relatively minor UI bug. backport from couchdb 1.3.x branch
Updates 1.2.x or earlier view files to 1.3.x or later view files transparently, the first time the 1.2.x view file is opened by 1.3.x or later. Here's how it works: Before opening a view index, If no matching index file is found in the new location: calculate the <= 1.2.x view signature if a file with that signature lives in the old location copy it to the new location with the new signature in the name. Then proceed to open the view index as usual. After opening, read its header. If the header matches the <= 1.2.x style #index_header record: upgrade the header to the new #mrheader record The next time the view is used, the new header is used. If we crash after the rename, but before the header upgrade, the header upgrade is done on the next view opening. If we crash between upgrading to the new header and writing that header to disk, we start with the old header again, do the upgrade and write to disk. backport from Couchdb 1.3.x branch
Patch by Alexander Shorin. (backport from couchdb 1.3.x branch)
Closes COUCHDB-317 Patch by Joan Touzet.