You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/12/13 22:29:44 UTC

[GitHub] [couchdb] chewbranca commented on a change in pull request #2360: Make the rexi:stream2 interface unacked message limit configurable

chewbranca commented on a change in pull request #2360: Make the rexi:stream2 interface unacked message limit configurable
URL: https://github.com/apache/couchdb/pull/2360#discussion_r357857768
 
 

 ##########
 File path: src/rexi/src/rexi.erl
 ##########
 @@ -213,7 +213,8 @@ stream(Msg, Limit, Timeout) ->
 
 %% @equiv stream2(Msg, 10, 300000)
 stream2(Msg) ->
-    stream2(Msg, 10, 300000).
+    Limit = config:get_integer("rexi", "stream_limit", 10),
+    stream2(Msg, Limit, 300000).
 
 Review comment:
   Minor nit, but it might be prudent to go `stream/1` --> `stream/2` --> `stream/3` rather than `stream/1` --> `stream/3` on the off chance the timeout param in `stream/2` is converted from a hardcoded value to a config lookup like you did here (we also shouldn't be duplicating magic numbers).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services