Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: remove the useless variable tidb_enable_point_get_cache #36844

Merged
merged 13 commits into from
Aug 3, 2022
1 change: 0 additions & 1 deletion sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,6 @@ func NewSessionVars() *SessionVars {
EnableClusteredIndex: DefTiDBEnableClusteredIndex,
EnableParallelApply: DefTiDBEnableParallelApply,
ShardAllocateStep: DefTiDBShardAllocateStep,
EnablePointGetCache: DefTiDBPointGetCache,
EnableAmendPessimisticTxn: DefTiDBEnableAmendPessimisticTxn,
PartitionPruneMode: *atomic2.NewString(DefTiDBPartitionPruneMode),
TxnScope: kv.NewDefaultTxnScopeVar(),
Expand Down
6 changes: 0 additions & 6 deletions sessionctx/variable/sysvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,6 @@ var defaultSysVars = []*SysVar{
SetMaxDeltaSchemaCount(TidbOptInt64(val, DefTiDBMaxDeltaSchemaCount))
return nil
}},
{Scope: ScopeGlobal, Name: TiDBEnablePointGetCache, Value: BoolToOnOff(DefTiDBPointGetCache), Hidden: true, Type: TypeBool, SetGlobal: func(s *SessionVars, val string) error {
EnablePointGetCache.Store(TiDBOptOn(val))
return nil
}, GetGlobal: func(s *SessionVars) (string, error) {
return BoolToOnOff(EnablePointGetCache.Load()), nil
}},
{Scope: ScopeGlobal, Name: TiDBScatterRegion, Value: BoolToOnOff(DefTiDBScatterRegion), Type: TypeBool},
{Scope: ScopeGlobal, Name: TiDBEnableStmtSummary, Value: BoolToOnOff(DefTiDBEnableStmtSummary), Type: TypeBool, AllowEmpty: true,
SetGlobal: func(s *SessionVars, val string) error {
Expand Down
5 changes: 0 additions & 5 deletions sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,6 @@ const (
// expression indexes and generated columns described here https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html for details.
TiDBEnableAutoIncrementInGenerated = "tidb_enable_auto_increment_in_generated"

// TiDBEnablePointGetCache is used to control whether to enable the point get cache for special scenario.
TiDBEnablePointGetCache = "tidb_enable_point_get_cache"

// TiDBPlacementMode is used to control the mode for placement
TiDBPlacementMode = "tidb_placement_mode"

Expand Down Expand Up @@ -888,7 +885,6 @@ const (
DefTiDBDDLReorgBatchSize = 256
DefTiDBDDLErrorCountLimit = 512
DefTiDBMaxDeltaSchemaCount = 1024
DefTiDBPointGetCache = false
DefTiDBPlacementMode = PlacementModeStrict
DefTiDBEnableAutoIncrementInGenerated = false
DefTiDBHashAggPartialConcurrency = ConcurrencyUnset
Expand Down Expand Up @@ -1032,7 +1028,6 @@ var (
DefExecutorConcurrency = 5
MemoryUsageAlarmRatio = atomic.NewFloat64(config.GetGlobalConfig().Instance.MemoryUsageAlarmRatio)
EnableLocalTxn = atomic.NewBool(DefTiDBEnableLocalTxn)
EnablePointGetCache = atomic.NewBool(DefTiDBPointGetCache)
MaxTSOBatchWaitInterval = atomic.NewFloat64(DefTiDBTSOClientBatchMaxWaitTime)
EnableTSOFollowerProxy = atomic.NewBool(DefTiDBEnableTSOFollowerProxy)
RestrictedReadOnly = atomic.NewBool(DefTiDBRestrictedReadOnly)
Expand Down