From 3185816249e29df2afa144adab5504677d92b05f Mon Sep 17 00:00:00 2001 From: hehechen Date: Tue, 27 Dec 2022 17:23:03 +0800 Subject: [PATCH] alloc mpp query id when buildMPPGather Signed-off-by: hehechen --- executor/builder.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/executor/builder.go b/executor/builder.go index f5536c425f510..c6baaf0932849 100644 --- a/executor/builder.go +++ b/executor/builder.go @@ -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. @@ -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()}, } } @@ -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 }