summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_db.erl
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-01-09 22:20:48 +0000
committerDamien F. Katz <damien@apache.org>2009-01-09 22:20:48 +0000
commit87f45e73df3e37fbb631bcb14871c621ee77489b (patch)
tree0e33d44479bc94dd8a28387d771ba5feb037441d /src/couchdb/couch_httpd_db.erl
parentf6664de58f489627fee6e4283a1d17e0c6a99433 (diff)
Added support so clients can detect if a server has potentially lost commits after multiple updates, like during bulk imports and so the replicator can detect lost commits on remote replications.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@733174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r--src/couchdb/couch_httpd_db.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index 5366da1e..0519061b 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -90,9 +90,10 @@ db_req(#httpd{path_parts=[_DbName]}=Req, _Db) ->
send_method_not_allowed(Req, "DELETE,GET,HEAD,POST");
db_req(#httpd{method='POST',path_parts=[_,<<"_ensure_full_commit">>]}=Req, Db) ->
- ok = couch_db:ensure_full_commit(Db),
+ {ok, DbStartTime} = couch_db:ensure_full_commit(Db),
send_json(Req, 201, {[
- {ok, true}
+ {ok, true},
+ {instance_start_time, DbStartTime}
]});
db_req(#httpd{path_parts=[_,<<"_ensure_full_commit">>]}=Req, _Db) ->