Skip to content

Commit

Permalink
backfill: remove unused bound account from column backfiller
Browse files Browse the repository at this point in the history
Previously, we were creating a bound account in the column backfiller
which was not being used to track anything. This change removes that.

Release note: None
  • Loading branch information
adityamaru committed Oct 27, 2020
1 parent 5e3c201 commit 2c85868
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/sql/backfill/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ type ColumnBackfiller struct {

// mon is a memory monitor linked with the ColumnBackfiller on creation.
mon *mon.BytesMonitor
// boundAccount is associated with mon and is used to track allocations during
// a column backfill.
boundAccount mon.BoundAccount
}

// initCols is a helper to populate some column metadata on a ColumnBackfiller.
Expand Down Expand Up @@ -137,7 +134,6 @@ func (cb *ColumnBackfiller) init(
return errors.AssertionFailedf("no memory monitor linked to ColumnBackfiller during init")
}
cb.mon = mon
cb.boundAccount = mon.MakeBoundAccount()

return cb.fetcher.Init(
evalCtx.Context,
Expand All @@ -147,7 +143,7 @@ func (cb *ColumnBackfiller) init(
descpb.ScanLockingWaitPolicy_BLOCK,
false, /* isCheck */
&cb.alloc,
mon,
cb.mon,
tableArgs,
)
}
Expand Down Expand Up @@ -239,7 +235,6 @@ func (cb *ColumnBackfiller) InitForDistributedUse(
func (cb *ColumnBackfiller) Close(ctx context.Context) {
cb.fetcher.Close(ctx)
if cb.mon != nil {
cb.boundAccount.Close(ctx)
cb.mon.Stop(ctx)
}
}
Expand Down

0 comments on commit 2c85868

Please sign in to comment.