Skip to content

Commit

Permalink
Revert "[pick to 1.2] fix a bug that process's cancel not match to it…
Browse files Browse the repository at this point in the history
…s context (matrixorigin#17349)"

This reverts commit 1624bf1.
  • Loading branch information
sukki37 committed Jul 7, 2024
1 parent ba250f1 commit 7befc64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion pkg/sql/compile/remoterunServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ func (receiver *messageReceiverOnServer) newCompile() (*Compile, error) {
cnInfo.hakeeper,
cnInfo.udfService,
cnInfo.aicm)
proc.Ctx = runningCtx
proc.Cancel = runningCancel
proc.UnixTime = pHelper.unixTime
proc.Id = pHelper.id
Expand Down
9 changes: 2 additions & 7 deletions pkg/vm/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,13 @@ func New(
hakeeper logservice.CNHAKeeperClient,
udfService udf.Service,
aicm *defines.AutoIncrCacheManager) *Process {

// process should always have a cancel context to help we close this query.
processCtx, processCancel := context.WithCancel(ctx)

return &Process{
mp: m,
Ctx: processCtx,
Cancel: processCancel,
Ctx: ctx,
TxnClient: txnClient,
TxnOperator: txnOperator,
FileService: fileService,
IncrService: incrservice.GetAutoIncrementService(processCtx),
IncrService: incrservice.GetAutoIncrementService(ctx),
UnixTime: time.Now().UnixNano(),
LastInsertID: new(uint64),
LockService: lockService,
Expand Down

0 comments on commit 7befc64

Please sign in to comment.