Skip to content

Commit

Permalink
Merge pull request cockroachdb#100254 from yuzefovich/backport22.2-99887
Browse files Browse the repository at this point in the history
release-22.2: distsql: fix sql.mem.distsql.current metric
  • Loading branch information
yuzefovich authored Apr 3, 2023
2 parents 9e4daf6 + 5d32f38 commit 375ad9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions pkg/sql/distsql/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ func NewServer(
memMonitor: mon.NewMonitor(
"distsql",
mon.MemoryResource,
cfg.Metrics.CurBytesCount,
cfg.Metrics.MaxBytesHist,
-1, /* increment: use default block size */
// Note that we don't use 'sql.mem.distsql.*' metrics here since
// that would double count them with the 'flow' monitor in
// setupFlow.
nil, /* curCount */
nil, /* maxHist */
-1, /* increment: use default block size */
noteworthyMemoryUsageBytes,
cfg.Settings,
),
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/tablewriter_upsert_opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (tu *optTableUpserter) init(
return err
}

// rowsNeeded, set upon initialization, indicates pkg/sql/backfill.gowhether or not we want
// rowsNeeded, set upon initialization, indicates whether or not we want
// rows returned from the operation.
if tu.rowsNeeded {
tu.resultRow = make(tree.Datums, len(tu.returnCols))
Expand Down

0 comments on commit 375ad9f

Please sign in to comment.