diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2010-06-08 16:50:58 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2010-06-08 16:50:58 +0000 |
commit | 5aae08bf66411e4e81b21a3c137627733efa6b26 (patch) | |
tree | ab4812d98265281c7f8ff0954841b3300b069930 | |
parent | 9765e4fc3e89400262330d907fb5429ada370428 (diff) |
preserve _revs_limit after compaction. COUCHDB-789
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@952732 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | share/www/script/test/compact.js | 2 | ||||
-rw-r--r-- | src/couchdb/couch_db_updater.erl | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/share/www/script/test/compact.js b/share/www/script/test/compact.js index 6a48992b..22eeaec1 100644 --- a/share/www/script/test/compact.js +++ b/share/www/script/test/compact.js @@ -39,12 +39,14 @@ couchTests.compact = function(debug) { T(db.ensureFullCommit().ok); var deletesize = db.info().disk_size; T(deletesize > originalsize); + T(db.setDbProperty("_revs_limit", 666).ok); T(db.compact().ok); T(db.last_req.status == 202); // compaction isn't instantaneous, loop until done while (db.info().compact_running) {}; T(db.info().instance_start_time == start_time); + T(db.getDbProperty("_revs_limit") === 666); T(db.ensureFullCommit().ok); restartServer(); diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl index df682f62..a8ffc6cc 100644 --- a/src/couchdb/couch_db_updater.erl +++ b/src/couchdb/couch_db_updater.erl @@ -165,7 +165,8 @@ handle_cast({compact_done, CompactFilepath}, #db{filepath=Filepath}=Db) -> local_docs_btree = NewLocalBtree, main_pid = Db#db.main_pid, filepath = Filepath, - instance_start_time = Db#db.instance_start_time + instance_start_time = Db#db.instance_start_time, + revs_limit = Db#db.revs_limit }), ?LOG_DEBUG("CouchDB swapping files ~s and ~s.", |