Skip to content

Commit 9960ae7

Browse files
authored
executor: do not track membuffer's memory in executor (#53985)
close #53984
1 parent fb132a9 commit 9960ae7

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

pkg/executor/delete.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ func (e *DeleteExec) deleteSingleTableByChunk(ctx context.Context) error {
156156
}
157157

158158
func (e *DeleteExec) doBatchDelete(ctx context.Context) error {
159-
txn, err := e.Ctx().Txn(false)
160-
if err != nil {
161-
return exeerrors.ErrBatchInsertFail.GenWithStack("BatchDelete failed with error: %v", err)
162-
}
163-
e.memTracker.Consume(-int64(txn.Size()))
164159
e.Ctx().StmtCommit(ctx)
165160
if err := sessiontxn.NewTxnInStmt(ctx, e.Ctx()); err != nil {
166161
// We should return a special error for batch insert.

pkg/executor/insert_common.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,6 @@ func insertRowsFromSelect(ctx context.Context, base insertCommon) error {
521521
}
522522

523523
func (e *InsertValues) doBatchInsert(ctx context.Context) error {
524-
txn, err := e.Ctx().Txn(false)
525-
if err != nil {
526-
return exeerrors.ErrBatchInsertFail.GenWithStack("BatchInsert failed with error: %v", err)
527-
}
528-
e.memTracker.Consume(-int64(txn.Size()))
529524
e.Ctx().StmtCommit(ctx)
530525
if err := sessiontxn.NewTxnInStmt(ctx, e.Ctx()); err != nil {
531526
// We should return a special error for batch insert.

pkg/executor/replace.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ func (e *ReplaceExec) exec(ctx context.Context, newRows [][]types.Datum) error {
161161
if err != nil {
162162
return err
163163
}
164-
txnSize := txn.Size()
165164

166165
if e.collectRuntimeStatsEnabled() {
167166
if snapshot := txn.GetSnapshot(); snapshot != nil {
@@ -187,7 +186,6 @@ func (e *ReplaceExec) exec(ctx context.Context, newRows [][]types.Datum) error {
187186
return err
188187
}
189188
}
190-
e.memTracker.Consume(int64(txn.Size() - txnSize))
191189
return txn.MayFlush()
192190
}
193191

0 commit comments

Comments
 (0)