diff --git a/pkg/server/server_sql.go b/pkg/server/server_sql.go index 652da7e7ab56..1f853486baf7 100644 --- a/pkg/server/server_sql.go +++ b/pkg/server/server_sql.go @@ -562,7 +562,7 @@ func newSQLServer(ctx context.Context, cfg sqlServerArgs) (*SQLServer, error) { cfg.clock, cfg.rangeFeedFactory, ) cfg.sqlInstanceReader = instancestorage.NewReader( - cfg.sqlInstanceStorage, cfg.sqlLivenessProvider.BlockingReader(), + cfg.sqlInstanceStorage, cfg.sqlLivenessProvider.CachedReader(), cfg.stopper, ) @@ -789,7 +789,7 @@ func newSQLServer(ctx context.Context, cfg sqlServerArgs) (*SQLServer, error) { RowMetrics: &rowMetrics, InternalRowMetrics: &internalRowMetrics, - SQLLivenessReader: cfg.sqlLivenessProvider.BlockingReader(), + SQLLivenessReader: cfg.sqlLivenessProvider.CachedReader(), JobRegistry: jobRegistry, Gossip: cfg.gossip, PodNodeDialer: cfg.podNodeDialer, diff --git a/pkg/sql/planner.go b/pkg/sql/planner.go index f061ce630dc2..89f5a63c1379 100644 --- a/pkg/sql/planner.go +++ b/pkg/sql/planner.go @@ -114,7 +114,7 @@ func (evalCtx *extendedEvalContext) copyFromExecCfg(execCfg *ExecutorConfig) { evalCtx.Settings = execCfg.Settings evalCtx.Codec = execCfg.Codec evalCtx.Tracer = execCfg.AmbientCtx.Tracer - evalCtx.SQLLivenessReader = execCfg.SQLLiveness.BlockingReader() + evalCtx.SQLLivenessReader = execCfg.SQLLiveness.CachedReader() evalCtx.CompactEngineSpan = execCfg.CompactEngineSpanFunc evalCtx.SetCompactionConcurrency = execCfg.CompactionConcurrencyFunc evalCtx.TestingKnobs = execCfg.EvalContextTestingKnobs