Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: release leases before running migrations
We fortunately prevent setting cluster settings in a transaction. That means that we have full control over the access to tables that run during the transaction which runs a cluster version upgrade. One observation is that upgrades can take a long time if we leak leases in some way. In cockroachdb#85391 we add function resolution which results in decriptors now being leased when you run the following statement because we need to resolve the function: `SET CLUSTER SETTING version = crdb_internal.node_executable_version()` Then the test ends up taking 5 minutes +/- 15% for the leases to expire. The downside here is that you don't get a transactional view of UDFs used in expressions inside `SET CLUSTER VERSION`. That seems fine to me. Release note: None
- Loading branch information