Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Dec 2, 2021
1 parent 4ce93bd commit 620ffe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1423,9 +1423,9 @@ func (b *executorBuilder) buildProjection(v *plannercore.PhysicalProjection) Exe
e.numWorkers = 0
}

// Use un-parallel projection for write query to avoid concurrent on memdb.
// Use un-parallel projection for query that write on memdb to avoid data race.
// See also https://github.com/pingcap/tidb/issues/26832
if b.inUpdateStmt || b.inDeleteStmt || b.inInsertStmt {
if b.inUpdateStmt || b.inDeleteStmt || b.inInsertStmt || b.hasLock {
e.numWorkers = 0
}
return e
Expand Down

0 comments on commit 620ffe9

Please sign in to comment.