Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
shanth96 committed Dec 11, 2023
1 parent afbc052 commit 177d2e4
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 758 deletions.
3 changes: 0 additions & 3 deletions go/mysql/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,6 @@ const (
// max execution time exceeded
ERQueryTimeout = 3024

// max execution time exceeded
ERQueryTimeout = 3024

ErrCantCreateGeometryObject = 1416
ErrGISDataWrongEndianess = 3055
ErrNotImplementedForCartesianSRS = 3704
Expand Down
26 changes: 0 additions & 26 deletions go/mysql/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,32 +377,6 @@ func TestSQLErrorOnServerClose(t *testing.T) {
require.True(t, IsConnLostDuringQuery(err), err.Error())
}

// This test has been added to verify that IO errors in a connection lead to SQL Server lost errors
// So that we end up closing the connection higher up the stack and not reusing it.
// This test was added in response to a panic that was run into.
func TestSQLErrorOnServerClose(t *testing.T) {
// Create socket pair for the server and client
listener, sConn, cConn := createSocketPair(t)
defer func() {
listener.Close()
sConn.Close()
cConn.Close()
}()

err := cConn.WriteComQuery("close before rows read")
require.NoError(t, err)

handler := &testRun{t: t}
_ = sConn.handleNextCommand(handler)

// From the server we will receive a field packet which the client will read
// At that point, if the server crashes and closes the connection.
// We should be getting a Connection lost error.
_, _, _, err = cConn.ReadQueryResult(100, true)
require.Error(t, err)
require.True(t, IsConnLostDuringQuery(err), err.Error())
}

func TestQueries(t *testing.T) {
listener, sConn, cConn := createSocketPair(t)
defer func() {
Expand Down
48 changes: 0 additions & 48 deletions go/test/endtoend/reparent/newfeaturetest/reparent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,51 +146,3 @@ func TestChangeTypeWithoutSemiSync(t *testing.T) {
err = clusterInstance.VtctlclientProcess.ExecuteCommand("ChangeTabletType", replica.Alias, "replica")
require.NoError(t, err)
}

// TestTabletRestart tests that a running tablet can be restarted and everything is still fine
func TestTabletRestart(t *testing.T) {
defer cluster.PanicHandler(t)
clusterInstance := utils.SetupReparentCluster(t, "semi_sync")
defer utils.TeardownCluster(clusterInstance)
tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets

utils.StopTablet(t, tablets[1], false)
tablets[1].VttabletProcess.ServingStatus = "SERVING"
err := tablets[1].VttabletProcess.Setup()
require.NoError(t, err)
}

// Tests ensures that ChangeTabletType works even when semi-sync plugins are not loaded.
func TestChangeTypeWithoutSemiSync(t *testing.T) {
defer cluster.PanicHandler(t)
clusterInstance := utils.SetupReparentCluster(t, "none")
defer utils.TeardownCluster(clusterInstance)
tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets

ctx := context.Background()

primary, replica := tablets[0], tablets[1]

// Unload semi sync plugins
for _, tablet := range tablets[0:4] {
qr := utils.RunSQL(ctx, t, "select @@global.super_read_only", tablet)
result := fmt.Sprintf("%v", qr.Rows[0][0].ToString())
if result == "1" {
utils.RunSQL(ctx, t, "set global super_read_only = 0", tablet)
}

utils.RunSQL(ctx, t, "UNINSTALL PLUGIN rpl_semi_sync_slave;", tablet)
utils.RunSQL(ctx, t, "UNINSTALL PLUGIN rpl_semi_sync_master;", tablet)
}

utils.ValidateTopology(t, clusterInstance, true)
utils.CheckPrimaryTablet(t, clusterInstance, primary)

// Change replica's type to rdonly
err := clusterInstance.VtctlclientProcess.ExecuteCommand("ChangeTabletType", replica.Alias, "rdonly")
require.NoError(t, err)

// Change tablets type from rdonly back to replica
err = clusterInstance.VtctlclientProcess.ExecuteCommand("ChangeTabletType", replica.Alias, "replica")
require.NoError(t, err)
}
110 changes: 0 additions & 110 deletions go/vt/proto/vtadmin/vtadmin_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 0 additions & 100 deletions go/vt/proto/vtctldata/vtctldata_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 177d2e4

Please sign in to comment.