Skip to content

Commit

Permalink
alloc mpp query id when buildMPPGather
Browse files Browse the repository at this point in the history
Signed-off-by: hehechen <chentongli@pingcap.com>
  • Loading branch information
hehechen committed Dec 27, 2022
1 parent 447a5a1 commit 3185816
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ type executorBuilder struct {
// can return a correct value even if the session context has already been destroyed
forDataReaderBuilder bool
dataReaderTS uint64
mppQueryID kv.MPPQueryID
}

// CTEStorages stores resTbl and iterInTbl for CTEExec.
Expand All @@ -131,7 +130,6 @@ func newExecutorBuilder(ctx sessionctx.Context, is infoschema.InfoSchema, ti *Te
isStaleness: staleread.IsStmtStaleness(ctx),
txnScope: txnManager.GetTxnScope(),
readReplicaScope: txnManager.GetReadReplicaScope(),
mppQueryID: kv.MPPQueryID{QueryTs: getMPPQueryTS(ctx), LocalQueryID: getMPPQueryID(ctx), ServerID: domain.GetDomain(ctx).ServerID()},
}
}

Expand Down Expand Up @@ -3404,7 +3402,7 @@ func (b *executorBuilder) buildMPPGather(v *plannercore.PhysicalTableReader) Exe
is: b.is,
originalPlan: v.GetTablePlan(),
startTS: startTs,
mppQueryID: b.mppQueryID,
mppQueryID: kv.MPPQueryID{QueryTs: getMPPQueryTS(b.ctx), LocalQueryID: getMPPQueryID(b.ctx), ServerID: domain.GetDomain(b.ctx).ServerID()},
}
return gather
}
Expand Down

0 comments on commit 3185816

Please sign in to comment.