You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
148488: sql: avoid contention between long mutation and auto stats r=yuzefovich a=yuzefovich
Previously, when processing large mutations in batches (see `BatchedNext` method), we would notify the stats refresher about the number of rows affected after each batch. If the mutation is long, then this could have triggered the auto stats collection that would contend with the mutation that triggered it. There is actually no reason to try collecting auto stats on those just-mutated rows since in most cases they haven't been committed yet. This commit fixes this issue by notifying the stats refresher about the total number of rows affected when the last batch of the mutation has just been processed. The bug has been present since about 19.1 version.
Note that we generally don't perform well with long mutations, but it seems like a worthwhile improvement nonetheless. We can't remove contention with auto stats triggered by _other_ mutations, but at least we can do so for self-inflicted ones. (Also probably a more important retry reason is the closed TS interval.)
Fixes: #148487.
Release note (bug fix): Large mutation statements (INSERTs, UPDATEs, DELETEs, UPSERTs) are now less likely to encounter contention with automatic table stats collection in some cases. The bug has been present since 19.1 version.
148607: *: consolidate `InternalClient` RPC client creation r=cthumuluru-crdb a=cthumuluru-crdb
This commit consolidates `InternalClient` RPC client creation logic and replaces RPC clients with adapters. It is a continuation of the work done in #147606.
Epic: CRDB-48923Fixes: #148353
Release note: none
Co-authored-by: Yahor Yuzefovich <[email protected]>
Co-authored-by: Chandra Thumuluru <[email protected]>
0 commit comments