couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r912609 - in /couchdb/branches/0.11.x: ./ etc/default/couchdb share/www/script/test/purge.js src/couchdb/couch_db_updater.erl
Date Mon, 22 Feb 2010 15:20:54 GMT
Author: davisp
Date: Mon Feb 22 15:20:53 2010
New Revision: 912609

URL: http://svn.apache.org/viewvc?rev=912609&view=rev
Log:
Fix _purge response. Backport of r912606.

Thanks to Filipe Manana again.



Modified:
    couchdb/branches/0.11.x/   (props changed)
    couchdb/branches/0.11.x/etc/default/couchdb   (props changed)
    couchdb/branches/0.11.x/share/www/script/test/purge.js
    couchdb/branches/0.11.x/src/couchdb/couch_db_updater.erl

Propchange: couchdb/branches/0.11.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 22 15:20:53 2010
@@ -6,4 +6,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474
+/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606

Propchange: couchdb/branches/0.11.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 22 15:20:53 2010
@@ -6,5 +6,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474
+/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/0.11.x/share/www/script/test/purge.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/share/www/script/test/purge.js?rev=912609&r1=912608&r2=912609&view=diff
==============================================================================
--- couchdb/branches/0.11.x/share/www/script/test/purge.js (original)
+++ couchdb/branches/0.11.x/share/www/script/test/purge.js Mon Feb 22 15:20:53 2010
@@ -54,13 +54,15 @@
   });
   T(xhr.status == 200);
 
+  var result = JSON.parse(xhr.responseText);
   var newInfo = db.info();
+  
   // purging increments the update sequence
   T(info.update_seq+1 == newInfo.update_seq);
   // and it increments the purge_seq
   T(info.purge_seq+1 == newInfo.purge_seq);
+  T(result.purge_seq == newInfo.purge_seq);
 
-  var result = JSON.parse(xhr.responseText);
   T(result.purged["1"][0] == doc1._rev);
   T(result.purged["2"][0] == doc2._rev);
 
@@ -91,6 +93,8 @@
   });
 
   T(xhr.status == 200);
+  result = JSON.parse(xhr.responseText);
+  T(result.purge_seq == db.info().purge_seq);
 
   var rows = db.view("test/all_docs_twice").rows;
   for (var i = 4; i < numDocs; i++) {

Modified: couchdb/branches/0.11.x/src/couchdb/couch_db_updater.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_db_updater.erl?rev=912609&r1=912608&r2=912609&view=diff
==============================================================================
--- couchdb/branches/0.11.x/src/couchdb/couch_db_updater.erl (original)
+++ couchdb/branches/0.11.x/src/couchdb/couch_db_updater.erl Mon Feb 22 15:20:53 2010
@@ -130,7 +130,7 @@
 
     ok = gen_server:call(Db2#db.main_pid, {db_updated, Db2}),
     couch_db_update_notifier:notify({updated, Db#db.name}),
-    {reply, {ok, Db2#db.update_seq, IdRevsPurged}, Db2}.
+    {reply, {ok, (Db2#db.header)#db_header.purge_seq, IdRevsPurged}, Db2}.
 
 
 handle_cast(start_compact, Db) ->



Mime
View raw message