From 046b52a065df15c2d20ccaa96d0b8b1f089cc912 Mon Sep 17 00:00:00 2001 From: Rustin Liu Date: Wed, 1 Nov 2023 18:09:37 +0800 Subject: [PATCH] statistics: fix the wrong comments (#48183) --- pkg/statistics/handle/storage/stats_read_writer.go | 3 ++- pkg/statistics/handle/util/interfaces.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/statistics/handle/storage/stats_read_writer.go b/pkg/statistics/handle/storage/stats_read_writer.go index bf9f84b7bd2ec..edc6043c46578 100644 --- a/pkg/statistics/handle/storage/stats_read_writer.go +++ b/pkg/statistics/handle/storage/stats_read_writer.go @@ -161,7 +161,8 @@ func (s *statsReadWriter) ChangeGlobalStatsID(from, to int64) (err error) { }, util.FlagWrapTxn) } -// ResetTableStats2KVForDrop resets the count to 0. +// ResetTableStats2KVForDrop update the version of mysql.stats_meta. +// Then GC worker will delete the old version of stats. func (s *statsReadWriter) ResetTableStats2KVForDrop(physicalID int64) (err error) { statsVer := uint64(0) defer func() { diff --git a/pkg/statistics/handle/util/interfaces.go b/pkg/statistics/handle/util/interfaces.go index 0ca9a971ee622..e3cd3a2ef8434 100644 --- a/pkg/statistics/handle/util/interfaces.go +++ b/pkg/statistics/handle/util/interfaces.go @@ -252,7 +252,8 @@ type StatsReadWriter interface { // then tidb-server will reload automatic. UpdateStatsVersion() error - // ResetTableStats2KVForDrop resets the count to 0. + // ResetTableStats2KVForDrop update the version of mysql.stats_meta. + // Then GC worker will delete the old version of stats. ResetTableStats2KVForDrop(physicalID int64) (err error) // ChangeGlobalStatsID changes the global stats ID.