diff --git a/go/vt/vttablet/endtoend/config_test.go b/go/vt/vttablet/endtoend/config_test.go index b1dc7f5dcb9..bb11f6b75ce 100644 --- a/go/vt/vttablet/endtoend/config_test.go +++ b/go/vt/vttablet/endtoend/config_test.go @@ -276,7 +276,7 @@ func TestQueryTimeout(t *testing.T) { assert.Equal(t, vtrpcpb.Code_ABORTED, vterrors.Code(err)) vend := framework.DebugVars() verifyIntValue(t, vend, "QueryTimeout", int(100*time.Millisecond)) - compareIntDiff(t, vend, "Kills/Connections", vstart, 1) + compareIntDiff(t, vend, "Kills/Queries", vstart, 1) } func changeVar(t *testing.T, name, value string) (revert func()) { diff --git a/go/vt/vttablet/tabletserver/connpool/dbconn.go b/go/vt/vttablet/tabletserver/connpool/dbconn.go index 61aa118d793..bc03281e2b2 100644 --- a/go/vt/vttablet/tabletserver/connpool/dbconn.go +++ b/go/vt/vttablet/tabletserver/connpool/dbconn.go @@ -184,7 +184,7 @@ func (dbc *Conn) execOnce(ctx context.Context, query string, maxrows int, wantfi select { case <-ctx.Done(): - _ = dbc.Kill(ctx.Err().Error(), time.Since(now)) + _ = dbc.KillQuery(ctx.Err().Error(), time.Since(now)) return nil, dbc.Err() case r := <-ch: if dbcErr := dbc.Err(); dbcErr != nil { @@ -280,7 +280,7 @@ func (dbc *Conn) streamOnce(ctx context.Context, query string, callback func(*sq select { case <-ctx.Done(): - _ = dbc.Kill(ctx.Err().Error(), time.Since(now)) + _ = dbc.KillQuery(ctx.Err().Error(), time.Since(now)) return dbc.Err() case err := <-ch: if dbcErr := dbc.Err(); dbcErr != nil { diff --git a/go/vt/vttablet/tabletserver/connpool/dbconn_test.go b/go/vt/vttablet/tabletserver/connpool/dbconn_test.go index e5e15cb0903..7e7e7b3c2b2 100644 --- a/go/vt/vttablet/tabletserver/connpool/dbconn_test.go +++ b/go/vt/vttablet/tabletserver/connpool/dbconn_test.go @@ -590,7 +590,7 @@ func TestDBExecOnceKillTimeout(t *testing.T) { // It should also run into a timeout. var timestampKill atomic.Int64 dbConn.killTimeout = 100 * time.Millisecond - db.AddQueryPatternWithCallback(`kill \d+`, &sqltypes.Result{}, func(string) { + db.AddQueryPatternWithCallback(`kill query \d+`, &sqltypes.Result{}, func(string) { timestampKill.Store(time.Now().UnixMicro()) // should take longer than the configured kill timeout above. time.Sleep(200 * time.Millisecond)