From d30c122e12d61dfe3ca9a3259e4ec7755b617f35 Mon Sep 17 00:00:00 2001 From: Zygimantas Benetis Date: Thu, 28 Mar 2024 08:29:54 +0200 Subject: [PATCH] boost: defer write cache --- go/vt/vtgate/plan_execute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/vtgate/plan_execute.go b/go/vt/vtgate/plan_execute.go index 30a30328328..dc75836870e 100644 --- a/go/vt/vtgate/plan_execute.go +++ b/go/vt/vtgate/plan_execute.go @@ -132,7 +132,7 @@ func (e *Executor) newExecute(ctx context.Context, safeSession *SafeSession, sql return sqlparser.StmtSelect, decodedResults, nil } else { stmt, sqlResult, err1 := e.executePlan(ctx, plan, vcursor, bindVars, execStart)(logStats, safeSession) - go e.setBoostCache(sqlResult, cacheKey) + defer e.setBoostCache(sqlResult, cacheKey) return stmt, sqlResult, err1 }