[SSSD] [PATCH] negcache: Soften condition for expired entries

Pavel Reichl preichl at redhat.com
Wed May 20 15:37:50 UTC 2015


On 05/20/2015 01:35 PM, Lukas Slebodnik wrote:
> ehlo,
>
> Type of timestamp for entries in negative cache is time_t
> which is number of *seconds* that have elapsed since 1 January 1970.
>
> The condition for ttl was to strict so entry could be valid
>   from  "ttl-1" to  ttl e.g.
>   * ttl is 1 second
>   * entry was stored to negative cache at 1432120871.999639
>     stored_timestamp = 1432120871
>   * entry was tested few miliseconds later 1432120872.001293
>     current_time = 1432120872
>
> Entry was marked as expired becuase result of condition was false
>    stored_timestamp + ttl < current_time
>            1432120871 + 1 < 1432120872
>
> This is a reason why ./test-negcache sometime fails.
> It's quite easily reproducible on slow machine or when valgrind was used.
>
> sh$ while libtool --mode=execute valgrind ./test-negcache ; do echo OK: done
>
> It would be good to push patch to master and sssd-1-12.
> So we can get gid of problematic failed tests in CI.
>
> LS
>
>
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
Thanks for the nice analyze of the problem and for taking time to fix 
this - it was a real nuisance.

Patch LGTM and CI passed:

http://sssd-ci.duckdns.org/logs/job/15/55/summary.html


ACK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150520/925546f0/attachment.html>


More information about the sssd-devel mailing list