nickva commented on a change in pull request #883: Fix erlang time module 
compatibility
URL: https://github.com/apache/couchdb/pull/883#discussion_r143834559
 
 

 ##########
 File path: src/couch/src/couch_auth_cache.erl
 ##########
 @@ -203,7 +203,8 @@ handle_call({fetch, UserName}, _From, State) ->
     [] ->
         couch_stats:increment_counter([couchdb, auth_cache_misses]),
         Creds = get_user_props_from_db(UserName),
-        State1 = add_cache_entry(UserName, Creds, erlang:now(), State),
+        ATime = couch_time_compat:unique_integer([monotonic, positive]),
 
 Review comment:
   I put it here  mainly to hide the ifdef ugliness. But I can move it to 
couch_util
   
   Though we should probably rename it as well to unique_monotonic_integer 
since  unique_integer/0 is not guaranteed to be always increasing, in theory 
could jump around like -10, then 100, then -5 etc.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to