diff --git a/examples/are-you-alive/README.md b/examples/are-you-alive/README.md index 7da5460c64d..0404ca98cc7 100644 --- a/examples/are-you-alive/README.md +++ b/examples/are-you-alive/README.md @@ -19,13 +19,13 @@ This client application: 1. Measures all the important things: - Client connection errors - Write latency - - Read latency from masters + - Read latency from primaries - Read latency from replicas - Write errors - - Read errors on masters + - Read errors on primaries - Write errors on replicas - - Errors in other operations on masters and replicas (e.g. COUNT) - - Latency on other operations on masters and replicas (e.g. COUNT) + - Errors in other operations on primaries and replicas (e.g. COUNT) + - Latency on other operations on primaries and replicas (e.g. COUNT) - Data loss (by writing predictable data and testing for that) 1. Reports all these metrics to Prometheus. @@ -35,8 +35,8 @@ That's it! First, [initialize your database with the correct schemas](schemas/README.md). -Run `are-you-alive --help` for usage. You can us the command line flags to -control the dataset size, whether to target reads at masters and replicas, your +Run `are-you-alive --help` for usage. You can use the command line flags to +control the dataset size, whether to target reads at primaries and replicas, your mysql connection string, and the rate at which to send requests. Example: @@ -75,10 +75,8 @@ exported. ## Test Specific Tablet Types -See [this vitess -documentation](https://vitess.io/docs/user-guides/faq/#how-do-i-choose-between-master-vs-replica-for-queries) -for how to target specific tablet types. In the configuration file you'll want -to, for example, put "@master" or "@replica" on the ends of your connection +Queries can target specific tablet types. In the configuration file you simply +need to, for example, put "@primary" or "@replica" on the ends of your connection strings. ## Push to Registry diff --git a/examples/are-you-alive/cmd/are-you-alive/main.go b/examples/are-you-alive/cmd/are-you-alive/main.go index 393b27c1fba..2d6ab04517c 100644 --- a/examples/are-you-alive/cmd/are-you-alive/main.go +++ b/examples/are-you-alive/cmd/are-you-alive/main.go @@ -172,7 +172,7 @@ var ( prometheusMetricsAddress = flag.String( "prometheus_metrics_address", ":8080", "Address on which to serve prometheus metrics") debug = flag.Bool("debug", false, "Enable debug logging") - useVtgate = flag.Bool("vtgate", false, "Using vtgate (for @master and @replica)") + useVtgate = flag.Bool("vtgate", false, "Using vtgate (for @primary and @replica)") initialize = flag.Bool("initialize", false, "Initialize database (for testing)") datasetSize = flag.Int("dataset_size", 10, "Number of total records in database") endpointsConfigFilename = flag.String("endpoints_config", "", "Endpoint and load configuration.") diff --git a/examples/are-you-alive/pkg/client/client.go b/examples/are-you-alive/pkg/client/client.go index 93178c99e8d..249c6ca2243 100644 --- a/examples/are-you-alive/pkg/client/client.go +++ b/examples/are-you-alive/pkg/client/client.go @@ -105,6 +105,7 @@ func ParseDBName(connectionString string) string { // See https://vitess.io/docs/faq/queries/ for where these come from. func ParseTabletType(connectionString string) string { databaseName := ParseDBName(connectionString) + // for backwards compatibility if strings.HasSuffix(databaseName, "@master") { return "primary" } else if strings.HasSuffix(databaseName, "@primary") { diff --git a/examples/local/orc_test.sh b/examples/local/orc_test.sh index 8c3cb38d86d..c8139d228c8 100755 --- a/examples/local/orc_test.sh +++ b/examples/local/orc_test.sh @@ -44,9 +44,6 @@ for i in 110 111; do CELL=zone2 KEYSPACE=commerce TABLET_UID=$i ./scripts/ovttablet-up.sh done -# set one of the replicas to primary -#vtctlclient InitShardMaster -force commerce/0 zone1-100 - # create the schema #vtctlclient ApplySchema -sql-file create_commerce_schema.sql commerce