Closed GoogleCodeExporter closed 9 years ago
Wow, a thorough report!
I'm sorry it was on a silly test like that. Some of the tests are subject to
timer failure; on a busy system or even on a fast system they'll fail
sometimes. I've been bumping the sleep from 2 to 3 when I find them. While
clock_handler will change the time to the actual amount of seconds passed, it
won't fire on a second alignment as you said. This means that occassionally
time bumps forward two seconds on a tick, or whatever.
Dustin has a "time travel" test method that's in uh... the 1.6 tree (I think?)
which completely removes the need for sleeping here at all.
In the meantime, I'll bump that guy to 3. Eventually we should have the tests
repaired anyway.
Original comment by dorma...@gmail.com
on 27 Oct 2011 at 5:53
No problem; I had to nail why it was happening to prove that it wasn't
my compiler
changes that were causing it.
Thanks; but I think maybe the way your time sampling system works
together with exptime might
cause problems for people more generally.
memcached/doc/protocol.txt defines exptime as:
'it is guaranteed that clients will not be able to
retrieve this item after the expiration time arrives (measured by
server time).'
I don't know if you define server time any where, but I guess people wouldn't
expect the sampled 1 second timing system, and it's effect that it could
actually hang around for almost 2s - although I guess people rarely
use that short/precise expiries in practice - it's just the word
'guaranteed' is pretty
strong.
Dave
Original comment by david.gi...@linaro.org
on 28 Oct 2011 at 12:38
It's not been an issue in practice. I've thought about a few ways to make it
more accurate (which aren't too hard), but there're too many other important
things that people do run into in production to care right now.
Having to wait for all those sleeps in the tests is more annoying than seconds
ticking slightly off from reality :)
Original comment by dorma...@gmail.com
on 28 Oct 2011 at 5:39
Original issue reported on code.google.com by
david.gi...@linaro.org
on 27 Oct 2011 at 3:30