You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/07/22 03:36:03 UTC

[1/2] config commit: updated refs/heads/master to 40d019e

Repository: couchdb-config
Updated Branches:
  refs/heads/master edd59c6b6 -> 40d019e43


Add longer timeouts for operations which could write to disk

It turns out that 5 seconds is often not enough in a severly throttled test
environment, and simple operations like config:set and config:delete raise
timeout errors.

Increase default 5 second timeout to half a minute. This should hopefully
handle even heavily throttled IO environments.

Fixed #703


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

Branch: refs/heads/master
Commit: ac2a33e240669f24af5b8e86499d9b88f8df61b2
Parents: edd59c6
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Fri Jul 21 23:13:01 2017 -0400
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Fri Jul 21 23:17:29 2017 -0400

----------------------------------------------------------------------
 src/config.erl | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-config/blob/ac2a33e2/src/config.erl
----------------------------------------------------------------------
diff --git a/src/config.erl b/src/config.erl
index 2c7819b..aa127d8 100644
--- a/src/config.erl
+++ b/src/config.erl
@@ -42,6 +42,8 @@
 
 -define(FEATURES, "features").
 
+-define(TIMEOUT, 30000).
+
 -record(config, {
     notify_funs=[],
     ini_files=undefined,
@@ -57,7 +59,7 @@ stop() ->
 
 
 reload() ->
-    gen_server:call(?MODULE, reload).
+    gen_server:call(?MODULE, reload, ?TIMEOUT).
 
 all() ->
     lists:sort(gen_server:call(?MODULE, all, infinity)).
@@ -166,7 +168,8 @@ set(Sec, Key, Val, Persist, Reason) when is_binary(Sec) and is_binary(Key) ->
     ?MODULE:set(binary_to_list(Sec), binary_to_list(Key), Val, Persist, Reason);
 set(Section, Key, Value, Persist, Reason)
         when is_list(Section), is_list(Key), is_list(Value) ->
-    gen_server:call(?MODULE, {set, Section, Key, Value, Persist, Reason});
+    gen_server:call(?MODULE, {set, Section, Key, Value, Persist, Reason},
+        ?TIMEOUT);
 set(_Sec, _Key, _Val, _Persist, _Reason) ->
     error(badarg).
 
@@ -184,7 +187,8 @@ delete(Section, Key, Reason) ->
 delete(Sec, Key, Persist, Reason) when is_binary(Sec) and is_binary(Key) ->
     delete(binary_to_list(Sec), binary_to_list(Key), Persist, Reason);
 delete(Section, Key, Persist, Reason) when is_list(Section), is_list(Key) ->
-    gen_server:call(?MODULE, {delete, Section, Key, Persist, Reason}).
+    gen_server:call(?MODULE, {delete, Section, Key, Persist, Reason},
+        ?TIMEOUT).
 
 
 features() ->


[2/2] config commit: updated refs/heads/master to 40d019e

Posted by va...@apache.org.
Merge remote-tracking branch 'cloudant/issue-703'

Fixes #703


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

Branch: refs/heads/master
Commit: 40d019e4376fa1caf26c0b54790454d4d8530402
Parents: edd59c6 ac2a33e
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Fri Jul 21 23:34:22 2017 -0400
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Fri Jul 21 23:34:22 2017 -0400

----------------------------------------------------------------------
 src/config.erl | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------