From 9096c1891c157ad781283ac5aa1c45549280fd6b Mon Sep 17 00:00:00 2001 From: gouhongshen Date: Thu, 20 Jul 2023 10:57:39 +0800 Subject: [PATCH] fix client label missing problem (#10767) some operations will clear the client's label info, which makes the backend server(CN) can not separate the workloads through label info. this PR corrected this unexpected clear-operation. Approved by: @qingxinhome --- pkg/frontend/computation_wrapper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/frontend/computation_wrapper.go b/pkg/frontend/computation_wrapper.go index 0a766b0c94a8..6c0a31a993a7 100644 --- a/pkg/frontend/computation_wrapper.go +++ b/pkg/frontend/computation_wrapper.go @@ -16,6 +16,7 @@ package frontend import ( "context" + "github.com/mohae/deepcopy" "github.com/google/uuid" "github.com/matrixorigin/matrixone/pkg/clusterservice" @@ -339,7 +340,7 @@ func (cwft *TxnComputationWrapper) Compile(requestCtx context.Context, u interfa cwft.proc, cwft.stmt, cwft.ses.isInternal, - cwft.ses.getCNLabels(), + deepcopy.Copy(cwft.ses.getCNLabels()).(map[string]string), ) if _, ok := cwft.stmt.(*tree.ExplainAnalyze); ok {