-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: maintain leases minutely in background loop during dist backfill
Extending the lease in the same loop as the distsql flow means it relies on that flow to finish promptly -- if it runs long (waiting on a flush or something), the loop is blocked and may fail loop around and extend the lease in time. This moves the lease extending to a separate, background loop, removing the strict time concerrn from the distsql flow. As structured, job progress information is still only updated one per loop, so the flow should still attempt to be bounded in execution time to avoid blocking the loop too long, but at least now if it does, it should not risk the schema change lease being lost. This opens the possibility of raising the default backfill run duration -- it was conservatively set lower since if it ran over for any reason -- i.e. blocked on a single slow request -- it could cause the problems described above, so as a result its default had to be *much* lower than the lease time. Release note: none.
- Loading branch information
Showing
1 changed file
with
119 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters