From 52e89613f613b6740d14bd91fca8df35472803d8 Mon Sep 17 00:00:00 2001 From: Andres Taylor Date: Sun, 15 Sep 2024 07:56:29 +0200 Subject: [PATCH] codegen Signed-off-by: Andres Taylor --- go/vt/vtgate/engine/cached_size.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/go/vt/vtgate/engine/cached_size.go b/go/vt/vtgate/engine/cached_size.go index b002b51a4ac..280556d4315 100644 --- a/go/vt/vtgate/engine/cached_size.go +++ b/go/vt/vtgate/engine/cached_size.go @@ -1337,6 +1337,20 @@ func (cached *ThrottleApp) CachedSize(alloc bool) int64 { size += cached.ThrottledAppRule.CachedSize(true) return size } +func (cached *Trace) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(24) + } + // field Inner vitess.io/vitess/go/vt/vtgate/engine.Primitive + if cc, ok := cached.Inner.(cachedObject); ok { + size += cc.CachedSize(true) + } + return size +} func (cached *TransactionStatus) CachedSize(alloc bool) int64 { if cached == nil { return int64(0)