couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [2/4] chttpd commit: updated refs/heads/2492-compaction to 3b50727
Date Thu, 27 Aug 2015 13:34:44 GMT
changes from review


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/dc3c8dd6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/dc3c8dd6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/dc3c8dd6

Branch: refs/heads/2492-compaction
Commit: dc3c8dd636e21dba1a09413b75efa90271769170
Parents: 0648df6
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Mon Aug 24 11:34:20 2015 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Mon Aug 24 18:03:03 2015 +0200

----------------------------------------------------------------------
 src/chttpd_db.erl | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/dc3c8dd6/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 1fec0ec..6d4f209 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -225,15 +225,15 @@ maybe_flush_changes_feed(Acc0, Data, Len) ->
     },
     {ok, Acc}.
 
-handle_compact_req(#httpd{method='POST'}=Req, Db) ->
-    case Req#httpd.path_parts of
-        [_DbName, <<"_compact">>] ->
-            ok = couch_db:check_is_admin(Db),
-            couch_httpd:validate_ctype(Req, "application/json"),
-            _ = couch_httpd:body(Req),
-            fabric:compact_db_all_nodes(Db#db.name),
-            send_json(Req, 202, {[{ok, true}]});
-    end;
+
+handle_compact_req(#httpd{
+        method='POST', path_parts=[_DbName, <<"_compact">>]
+    }=Req, Db) ->
+    couch_httpd:validate_ctype(Req, "application/json"),
+    ok = couch_db:check_is_admin(Db),
+    couch_httpd:body(Req),
+    fabric:compact_db(Db#db.name),
+    send_json(Req, 202, {[{ok, true}]});
 
 handle_compact_req(Req, _Db) ->
     send_method_not_allowed(Req, "POST").


Mime
View raw message