Skip to content

Commit

Permalink
persistedsqlstats: fixup some comments
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
knz authored and cameronnunez committed May 2, 2023
1 parent 1848c00 commit 7008fc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/sql/sqlstats/persistedsqlstats/flush.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/sqlstats/persistedsqlstats/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 7008fc5

Please sign in to comment.