summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chttpd_db.erl25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 0317aed4..211eed2d 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -211,31 +211,10 @@ db_req(#httpd{method='POST',path_parts=[DbName], user_ctx=Ctx}=Req, Db) ->
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) ->
- UpdateSeq = ?COUCH:get_update_seq(Db),
- CommittedSeq = ?COUCH:get_committed_update_seq(Db),
- {ok, StartTime} =
- case chttpd:qs_value(Req, "seq") of
- undefined ->
- committed = couch_batch_save:commit_now(Db#db.name, Db#db.user_ctx),
- ?COUCH:ensure_full_commit(Db);
- RequiredStr ->
- RequiredSeq = list_to_integer(RequiredStr),
- if RequiredSeq > UpdateSeq ->
- throw({bad_request,
- "can't do a full commit ahead of current update_seq"});
- RequiredSeq > CommittedSeq ->
- % user asked for an explicit sequence, don't commit any batches
- ?COUCH:ensure_full_commit(Db);
- true ->
- %% hack to make sure we always get cluster max time - APK
- ?COUCH:ensure_full_commit(Db)
- % {ok, Db#db.instance_start_time}
- end
- end,
+db_req(#httpd{method='POST',path_parts=[_,<<"_ensure_full_commit">>]}=Req, _Db) ->
send_json(Req, 201, {[
{ok, true},
- {instance_start_time, StartTime}
+ {instance_start_time, <<"0">>}
]});
db_req(#httpd{path_parts=[_,<<"_ensure_full_commit">>]}=Req, _Db) ->