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)