-
Notifications
You must be signed in to change notification settings - Fork 4.1k
closedts: allow serving follower after transfer for reads before lease start #35129
Description
When a lease transfer occurs, follower replicas become unable to server follower reads until a new closed timestamp update is received. It is unfortunate that a lease transfer leads to a period of time where a follower can no longer serve a read at a timestamp it was previously able to serve. @nvanbenschoten observes in #35120 (comment) that the lease transfer start time can effectively act as a closed timestamp for a given range. A range can determine if it can use a follower read by checking whether the requested timestamp falls before max(store-wide CT, lease start ts). While for the former case we need to ensure the MLAI, for the latter case we should be safe to read at time before the lease start so long as the follower replica currently knows of a lease which starts after the requested timestamp.
Describe the solution you'd like
Lease transfers do not prevent follower reads from timestamps which were previously safe.
Describe alternatives you've considered
One suggestion was that we could keep a history of leases and use that history to determine a valid previous closed timestamp .