From e27bbbb380dc37d3b7a792636c2e10dea65b56d8 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 12 Jan 2011 04:50:48 +0000 Subject: Preserve purge metadata during compaction, thanks Mike Leddy Closes COUCHDB-1021 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1057987 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/purge.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share/www') diff --git a/share/www/script/test/purge.js b/share/www/script/test/purge.js index af72ea4f..f8f45138 100644 --- a/share/www/script/test/purge.js +++ b/share/www/script/test/purge.js @@ -76,6 +76,14 @@ couchTests.purge = function(debug) { } T(db.view("test/single_doc").total_rows == 0); + // purge sequences are preserved after compaction (COUCHDB-1021) + T(db.compact().ok); + T(db.last_req.status == 202); + // compaction isn't instantaneous, loop until done + while (db.info().compact_running) {}; + var compactInfo = db.info(); + T(compactInfo.purge_seq == newInfo.purge_seq); + // purge documents twice in a row without loading views // (causes full view rebuilds) -- cgit v1.2.3