eiri commented on a change in pull request #3588:
URL: https://github.com/apache/couchdb/pull/3588#discussion_r642699197
##########
File path: src/aegis/src/aegis_server.erl
##########
@@ -286,8 +278,10 @@ is_key_fresh(UUID) ->
Now = fabric2_util:now(sec),
case ets:lookup(?KEY_CHECK, UUID) of
- [{UUID, ExpiresAt}] when ExpiresAt >= Now -> true;
- _ -> false
+ [{UUID, ExpiresAt}] when ExpiresAt - ?KEY_EARLY_EXPIRE_SEC > Now ->
Review comment:
As I see it "refresh" is different from "expire" is that it's happening
transparently for the client, i.e. async and in background. Here both behave
the same, because fdb context limitation, so from user's perspective it'll
looks like they set expiration for 10 sec and got key expired every 5 sec
instead, doesn't look intuitive.
--
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:
[email protected]