From 7008fc55e5e2dd51826c42401231e4cc0cb8eb4d Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Fri, 28 Apr 2023 14:47:02 +0200 Subject: [PATCH] persistedsqlstats: fixup some comments Release note: None --- pkg/sql/sqlstats/persistedsqlstats/flush.go | 2 +- pkg/sql/sqlstats/persistedsqlstats/provider.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/sql/sqlstats/persistedsqlstats/flush.go b/pkg/sql/sqlstats/persistedsqlstats/flush.go index 9704f3017dfd..8345c315cfce 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/flush.go +++ b/pkg/sql/sqlstats/persistedsqlstats/flush.go @@ -28,7 +28,7 @@ import ( "github.com/cockroachdb/errors" ) -// Flush flushes in-memory sql stats into system table. Any errors encountered +// Flush flushes in-memory sql stats into a system table. Any errors encountered // during the flush will be logged as warning. func (s *PersistedSQLStats) Flush(ctx context.Context) { now := s.getTimeNow() diff --git a/pkg/sql/sqlstats/persistedsqlstats/provider.go b/pkg/sql/sqlstats/persistedsqlstats/provider.go index 9652dbb36360..d77c5502f098 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/provider.go +++ b/pkg/sql/sqlstats/persistedsqlstats/provider.go @@ -68,7 +68,7 @@ type PersistedSQLStats struct { // exceeded. memoryPressureSignal chan struct{} - // Use the signal the flush completed. + // Used to signal the flush completed. flushDoneCallback func() flushMutex syncutil.Mutex @@ -173,7 +173,7 @@ func (s *PersistedSQLStats) startSQLStatsFlushLoop(ctx context.Context, stopper case <-s.memoryPressureSignal: // We are experiencing memory pressure, so we flush SQL stats to disk // immediately, rather than waiting the full flush interval, in an - // attempt to relieve some of that pressure + // attempt to relieve some of that pressure. case <-resetIntervalChanged: // In this case, we would restart the loop without performing any flush // and recalculate the flush interval in the for-loop's post statement.