palantir / atlasdb

Transactional Distributed Database Layer
https://palantir.github.io/atlasdb/
Apache License 2.0
54 stars 10 forks source link

Inconsistency in Async TimeLock and Legacy TimeLock Adapter #2205

Open jeremyk-91 opened 7 years ago

jeremyk-91 commented 7 years ago

Async Timelock generates an unprotected AsyncLockService and ManagedTimestampService, and then wraps itself in an AwaitingLeadershipProxy, preventing calls from succeeding on non-leaders.

Legacy Timelock Adapter generates a protected RemoteLockService and a protected ManagedTimestampService, but does not wrap itself in any protection. This is fine as well as underlying calls are delegated to services that will only succeed if they are the leader.

No correctness problem here, but I see no reason why they should be inconsistent!

Generally I prefer 'raw everything until registration', though would be fine either way.

jeremyk-91 commented 7 years ago

Note: I plan to drive-by fix this as a part of PaxosAgent work, but tracking here in case other things change / the current impl turns out to be problematic.

jeremyk-91 commented 7 years ago

Booting this back to New Issues. Unfortunately, because of visibility issues, a fix is not completely trivial, so I don't plan on doing it alongside the Paxos Agent work just yet.

Still worth consideration, but this is not super critical.