Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/236#discussion_r105881200
  
    --- Diff: src/couch_db_updater.erl ---
    @@ -1454,3 +1468,44 @@ default_security_object(_DbName) ->
             "everyone" ->
                 []
         end.
    +
    +% These functions rely on using the process dictionary. This is usually 
frowned
    +% upon howver in this case it is done to avoid changing to a different 
server state
    +% record. Once PSE (Pluggable Storage Engine) code lands this should be 
moved to the
    +% #db{} record.
    +
    +schedule_timeout() ->
    +    case get(idle_timer_ref) of
    +        TimerRef when is_reference(TimerRef) ->
    +            erlang:cancel_timer(TimerRef);
    +        undefined  ->
    +            ok
    +    end,
    +    case idle_limit() of
    +        infinity ->
    +            ok;
    +        Timeout when is_integer(Timeout) ->
    +            TRef = erlang:send_after(Timeout, self(), timeout),
    --- End diff --
    
    I'm confused as to why we have a timer that sends `timeout` _and_ we've 
changed all the gen_server replies to use the form that generates a timeout 
anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to