From 4ab096b1f13a480563117aac8431164ade130301 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Wed, 19 Jun 2024 17:49:35 +0200 Subject: [PATCH] update cluster.PanicHandler(...) Signed-off-by: Tim Vaillancourt --- go/test/endtoend/cluster/cluster_util.go | 2 +- go/vt/vtgate/engine/cached_size.go | 40 +++++++++---------- go/vt/vtgate/evalengine/cached_size.go | 2 +- .../tabletserver/rules/cached_size.go | 4 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go/test/endtoend/cluster/cluster_util.go b/go/test/endtoend/cluster/cluster_util.go index 1134e51d40d..e6863de19ff 100644 --- a/go/test/endtoend/cluster/cluster_util.go +++ b/go/test/endtoend/cluster/cluster_util.go @@ -113,7 +113,7 @@ func VerifyRowsInTablet(t *testing.T, vttablet *Vttablet, ksName string, expecte } // PanicHandler handles the panic in the testcase. -func PanicHandler(t *testing.T) { +func PanicHandler(t testing.TB) { err := recover() if t == nil { return diff --git a/go/vt/vtgate/engine/cached_size.go b/go/vt/vtgate/engine/cached_size.go index 14962bc86d7..c884a41dc49 100644 --- a/go/vt/vtgate/engine/cached_size.go +++ b/go/vt/vtgate/engine/cached_size.go @@ -53,7 +53,7 @@ func (cached *AlterVSchema) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(16) + size += int64(24) } // field Keyspace *vitess.io/vitess/go/vt/vtgate/vindexes.Keyspace size += cached.Keyspace.CachedSize(true) @@ -111,7 +111,7 @@ func (cached *DBDDL) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(32) + size += int64(48) } // field name string size += hack.RuntimeAllocSize(int64(len(cached.name))) @@ -172,7 +172,7 @@ func (cached *Delete) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(8) + size += int64(16) } // field DML *vitess.io/vitess/go/vt/vtgate/engine.DML size += cached.DML.CachedSize(true) @@ -192,7 +192,7 @@ func (cached *Distinct) CachedSize(alloc bool) int64 { } // field CheckCols []vitess.io/vitess/go/vt/vtgate/engine.CheckCol { - size += hack.RuntimeAllocSize(int64(cap(cached.CheckCols)) * int64(18)) + size += hack.RuntimeAllocSize(int64(cap(cached.CheckCols)) * int64(24)) for _, elem := range cached.CheckCols { size += elem.CachedSize(false) } @@ -219,7 +219,7 @@ func (cached *Filter) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(48) + size += int64(64) } // field Predicate vitess.io/vitess/go/vt/vtgate/evalengine.Expr if cc, ok := cached.Predicate.(cachedObject); ok { @@ -445,7 +445,7 @@ func (cached *Lock) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(64) + size += int64(80) } // field Keyspace *vitess.io/vitess/go/vt/vtgate/vindexes.Keyspace size += cached.Keyspace.CachedSize(true) @@ -512,7 +512,7 @@ func (cached *MemorySort) CachedSize(alloc bool) int64 { } // field OrderBy []vitess.io/vitess/go/vt/vtgate/engine.OrderByParams { - size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(36)) + size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(40)) } // field Input vitess.io/vitess/go/vt/vtgate/engine.Primitive if cc, ok := cached.Input.(cachedObject); ok { @@ -539,7 +539,7 @@ func (cached *MergeSort) CachedSize(alloc bool) int64 { } // field OrderBy []vitess.io/vitess/go/vt/vtgate/engine.OrderByParams { - size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(36)) + size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(40)) } return size } @@ -549,7 +549,7 @@ func (cached *OnlineDDL) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(64) + size += int64(80) } // field Keyspace *vitess.io/vitess/go/vt/vtgate/vindexes.Keyspace size += cached.Keyspace.CachedSize(true) @@ -646,7 +646,7 @@ func (cached *Projection) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(64) + size += int64(80) } // field Cols []string { @@ -698,7 +698,7 @@ func (cached *RenameFields) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(64) + size += int64(80) } // field Cols []string { @@ -723,7 +723,7 @@ func (cached *ReplaceVariables) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(16) + size += int64(24) } // field Input vitess.io/vitess/go/vt/vtgate/engine.Primitive if cc, ok := cached.Input.(cachedObject); ok { @@ -737,7 +737,7 @@ func (cached *RevertMigration) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(48) + size += int64(64) } // field Keyspace *vitess.io/vitess/go/vt/vtgate/vindexes.Keyspace size += cached.Keyspace.CachedSize(true) @@ -767,7 +767,7 @@ func (cached *Route) CachedSize(alloc bool) int64 { size += hack.RuntimeAllocSize(int64(len(cached.FieldQuery))) // field OrderBy []vitess.io/vitess/go/vt/vtgate/engine.OrderByParams { - size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(36)) + size += hack.RuntimeAllocSize(int64(cap(cached.OrderBy)) * int64(40)) } // field RoutingParameters *vitess.io/vitess/go/vt/vtgate/engine.RoutingParameters size += cached.RoutingParameters.CachedSize(true) @@ -836,7 +836,7 @@ func (cached *Rows) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(48) + size += int64(64) } // field rows [][]vitess.io/vitess/go/sqltypes.Value { @@ -973,7 +973,7 @@ func (cached *SessionPrimitive) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(24) + size += int64(32) } // field name string size += hack.RuntimeAllocSize(int64(len(cached.name))) @@ -1008,7 +1008,7 @@ func (cached *ShowExec) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(16) + size += int64(24) } // field ShowFilter *vitess.io/vitess/go/vt/sqlparser.ShowFilter size += cached.ShowFilter.CachedSize(true) @@ -1110,7 +1110,7 @@ func (cached *Update) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(16) + size += int64(24) } // field DML *vitess.io/vitess/go/vt/vtgate/engine.DML size += cached.DML.CachedSize(true) @@ -1137,7 +1137,7 @@ func (cached *UpdateTarget) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(16) + size += int64(24) } // field Target string size += hack.RuntimeAllocSize(int64(len(cached.Target))) @@ -1165,7 +1165,7 @@ func (cached *VStream) CachedSize(alloc bool) int64 { } size := int64(0) if alloc { - size += int64(64) + size += int64(80) } // field Keyspace *vitess.io/vitess/go/vt/vtgate/vindexes.Keyspace size += cached.Keyspace.CachedSize(true) diff --git a/go/vt/vtgate/evalengine/cached_size.go b/go/vt/vtgate/evalengine/cached_size.go index a2a26bafe1e..a5c69e616fb 100644 --- a/go/vt/vtgate/evalengine/cached_size.go +++ b/go/vt/vtgate/evalengine/cached_size.go @@ -241,7 +241,7 @@ func (cached *EvalResult) CachedSize(alloc bool) int64 { // field tuple_ *[]vitess.io/vitess/go/vt/vtgate/evalengine.EvalResult if cached.tuple_ != nil { size += int64(24) - size += hack.RuntimeAllocSize(int64(cap(*cached.tuple_)) * int64(88)) + size += hack.RuntimeAllocSize(int64(cap(*cached.tuple_)) * int64(96)) for _, elem := range *cached.tuple_ { size += elem.CachedSize(false) } diff --git a/go/vt/vttablet/tabletserver/rules/cached_size.go b/go/vt/vttablet/tabletserver/rules/cached_size.go index acfd199f1f2..1375ef2cb7b 100644 --- a/go/vt/vttablet/tabletserver/rules/cached_size.go +++ b/go/vt/vttablet/tabletserver/rules/cached_size.go @@ -108,7 +108,7 @@ func (cached *bvcre) CachedSize(alloc bool) int64 { } // field re *regexp.Regexp if cached.re != nil { - size += hack.RuntimeAllocSize(int64(153)) + size += hack.RuntimeAllocSize(int64(160)) } return size } @@ -124,7 +124,7 @@ func (cached *namedRegexp) CachedSize(alloc bool) int64 { size += hack.RuntimeAllocSize(int64(len(cached.name))) // field Regexp *regexp.Regexp if cached.Regexp != nil { - size += hack.RuntimeAllocSize(int64(153)) + size += hack.RuntimeAllocSize(int64(160)) } return size }