From 881851f365071020142e2f4f042089f60ed0f140 Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Fri, 15 Nov 2024 13:37:26 +0530 Subject: [PATCH] turn off raw packets when consolidation is on Signed-off-by: Harshit Gangal --- go/vt/vttablet/tabletserver/query_executor.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/go/vt/vttablet/tabletserver/query_executor.go b/go/vt/vttablet/tabletserver/query_executor.go index 4ac07961449..c9f91001a0e 100644 --- a/go/vt/vttablet/tabletserver/query_executor.go +++ b/go/vt/vttablet/tabletserver/query_executor.go @@ -102,12 +102,12 @@ func allocStreamResult() *sqltypes.Result { return streamResultPool.Get().(*sqltypes.Result) } -func (qre *QueryExecutor) shouldConsolidate() bool { - // TODO (harshit): This is a temporary implementation to test the feature. - // This should ideally work with consolidator. - if qre.options.GetRawMysqlPackets() { - return false - } +func (qre *QueryExecutor) shouldConsolidate() (consolidate bool) { + defer func() { + if consolidate && qre.options != nil { + qre.options.RawMysqlPackets = false + } + }() co := qre.options.GetConsolidator() switch co { case querypb.ExecuteOptions_CONSOLIDATOR_DISABLED: