Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download mariadb from vitess-resources #12271

Merged
merged 3 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions go/test/endtoend/vreplication/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func downloadDBTypeVersion(dbType string, majorVersion string, path string) erro
versionFile = "mysql-8.0.28-linux-glibc2.17-x86_64-minimal.tar.xz"
url = "https://dev.mysql.com/get/Downloads/MySQL-8.0/" + versionFile
} else if dbType == "mariadb" && majorVersion == "10.10" {
versionFile = "mariadb-10.10.2-linux-systemd-x86_64.tar.gz"
url = "https://mirror.rackspace.com/mariadb/mariadb-10.10.2/bintar-linux-systemd-x86_64/" + versionFile
versionFile = "mariadb-10.10.3-linux-systemd-x86_64.tar.gz"
url = "https://github.com/vitessio/vitess-resources/releases/download/v4.0/" + versionFile
} else {
return fmt.Errorf("invalid/unsupported major version: %s for database: %s", majorVersion, dbType)
}
Expand Down Expand Up @@ -425,7 +425,7 @@ func (vc *VitessCluster) AddTablet(t testing.TB, cell *Cell, keyspace *Keyspace,
"--enable-lag-throttler",
"--heartbeat_enable",
"--heartbeat_interval", "250ms",
} //FIXME: for multi-cell initial schema doesn't seem to load without "--queryserver-config-schema-reload-time"
} // FIXME: for multi-cell initial schema doesn't seem to load without "--queryserver-config-schema-reload-time"
options = append(options, extraVTTabletArgs...)

if mainClusterConfig.vreplicationCompressGTID {
Expand Down Expand Up @@ -570,7 +570,7 @@ func (vc *VitessCluster) DeleteShard(t testing.TB, cellName string, ksName strin
tab.Vttablet.TearDown()
}
log.Infof("Deleting Shard %s", shardName)
//TODO how can we avoid the use of even_if_serving?
// TODO how can we avoid the use of even_if_serving?
if output, err := vc.VtctlClient.ExecuteCommandWithOutput("DeleteShard", "--", "--recursive", "--even_if_serving", ksName+"/"+shardName); err != nil {
t.Fatalf("DeleteShard command failed with error %+v and output %s\n", err, output)
}
Expand Down Expand Up @@ -615,7 +615,7 @@ func (vc *VitessCluster) teardown(t testing.TB) {
}
}
}
//collect unique keyspaces across cells
// collect unique keyspaces across cells
keyspaces := make(map[string]*Keyspace)
for _, cell := range vc.Cells {
for _, keyspace := range cell.Keyspaces {
Expand Down
20 changes: 10 additions & 10 deletions go/test/endtoend/vreplication/vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,15 +781,15 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl
matchInsertQuery2 := "insert into customer(`name`, cid) values (:vtg1, :_cid0)"
require.False(t, validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "customer", insertQuery2, matchInsertQuery2))

insertQuery2 = "insert into customer(name, cid) values('tempCustomer3', 101)" //ID 101, hence due to reverse_bits in shard 80-
insertQuery2 = "insert into customer(name, cid) values('tempCustomer3', 101)" // ID 101, hence due to reverse_bits in shard 80-
require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, customerTab2, "customer", insertQuery2, matchInsertQuery2))

insertQuery2 = "insert into customer(name, cid) values('tempCustomer4', 102)" //ID 102, hence due to reverse_bits in shard -80
insertQuery2 = "insert into customer(name, cid) values('tempCustomer4', 102)" // ID 102, hence due to reverse_bits in shard -80
require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, customerTab1, "customer", insertQuery2, matchInsertQuery2))

execVtgateQuery(t, vtgateConn, "customer", "update customer set meta = convert(x'7b7d' using utf8mb4) where cid = 1")
if testReverse {
//Reverse Replicate
// Reverse Replicate
switchReads(t, workflowType, allCellNames, ksWorkflow, true)
printShardPositions(vc, ksShards)
switchWrites(t, workflowType, ksWorkflow, true)
Expand All @@ -809,7 +809,7 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl

waitForNoWorkflowLag(t, vc, targetKs, workflow)

//Go forward again
// Go forward again
switchReads(t, workflowType, allCellNames, ksWorkflow, false)
switchWrites(t, workflowType, ksWorkflow, false)

Expand Down Expand Up @@ -839,11 +839,11 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl
assert.NoError(t, err, "Customer table not deleted from zone1-200")
require.True(t, found)

insertQuery2 = "insert into customer(name, cid) values('tempCustomer8', 103)" //ID 103, hence due to reverse_bits in shard 80-
insertQuery2 = "insert into customer(name, cid) values('tempCustomer8', 103)" // ID 103, hence due to reverse_bits in shard 80-
require.False(t, validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "customer", insertQuery2, matchInsertQuery2))
insertQuery2 = "insert into customer(name, cid) values('tempCustomer10', 104)" //ID 105, hence due to reverse_bits in shard -80
insertQuery2 = "insert into customer(name, cid) values('tempCustomer10', 104)" // ID 105, hence due to reverse_bits in shard -80
require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, customerTab1, "customer", insertQuery2, matchInsertQuery2))
insertQuery2 = "insert into customer(name, cid) values('tempCustomer9', 105)" //ID 104, hence due to reverse_bits in shard 80-
insertQuery2 = "insert into customer(name, cid) values('tempCustomer9', 105)" // ID 104, hence due to reverse_bits in shard 80-
require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, customerTab2, "customer", insertQuery2, matchInsertQuery2))

execVtgateQuery(t, vtgateConn, "customer", "delete from customer where name like 'tempCustomer%'")
Expand Down Expand Up @@ -939,15 +939,15 @@ func reshardMerchant3to1Merge(t *testing.T) {
})
}

func reshardCustomer3to2SplitMerge(t *testing.T) { //-40,40-80,80-c0 => merge/split, c0- stays the same ending up with 3
func reshardCustomer3to2SplitMerge(t *testing.T) { // -40,40-80,80-c0 => merge/split, c0- stays the same ending up with 3
t.Run("reshardCustomer3to2SplitMerge", func(t *testing.T) {
ksName := "customer"
counts := map[string]int{"zone1-1000": 8, "zone1-1100": 8, "zone1-1200": 5}
reshard(t, ksName, "customer", "c4c3", "-40,40-80,80-c0", "-60,60-c0", 1000, counts, nil, nil, "")
})
}

func reshardCustomer3to1Merge(t *testing.T) { //to unsharded
func reshardCustomer3to1Merge(t *testing.T) { // to unsharded
t.Run("reshardCustomer3to1Merge", func(t *testing.T) {
ksName := "customer"
counts := map[string]int{"zone1-1500": 21}
Expand Down Expand Up @@ -1430,7 +1430,7 @@ func switchWrites(t *testing.T, workflowType, ksWorkflow string, reverse bool) {
if output != "" {
fmt.Printf("Output of switching writes for %s:\n++++++\n%s\n--------\n", ksWorkflow, output)
}
//printSwitchWritesExtraDebug is useful when debugging failures in Switch writes due to corner cases/races
// printSwitchWritesExtraDebug is useful when debugging failures in Switch writes due to corner cases/races
_ = printSwitchWritesExtraDebug
require.NoError(t, err, fmt.Sprintf("Switch writes Error: %s: %s", err, output))
}
Expand Down