4 ms·
I mean, you probably shouldn't rely on the local system time for determining lease timeouts for correctness, if it matters.
by foota 7y ago
I mean, you probably shouldn't rely on the local system time for determining lease timeouts for correctness, if it matters.
- senderista 7y agoI mean something like CLOCK_MONOTONIC.
- foota 7y agoDon't you still need to worry about the clock not going up in pace with others? Like if a system has a lease until "100" but the clock doesn't tick (or more realistically ticks slowly), then another system could think it had the lease if it observed a local system time of 101? Maybe I'm misunderstanding how you're using the leases though.
- senderista 7y agoYes you do, and normally an upper bound epsilon for clock rate skew is explicitly assumed. That's obviously fragile but there are many highly available systems that have managed to get away with it, partly by keeping leases short.