Skip to content

Commit 8665230

Browse files
mounicasruthideepthirohit-nayak-ps
authored
Merge flags-refactor branch to main (#18280)
Signed-off-by: mounicasruthi <[email protected]> Signed-off-by: Mounica Sruthi <[email protected]> Signed-off-by: Rohit Nayak <[email protected]> Co-authored-by: Deepthi Sigireddi <[email protected]> Co-authored-by: Rohit Nayak <[email protected]>
1 parent 55564ca commit 8665230

File tree

198 files changed

+2318
-1757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+2318
-1757
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ report
9393
# mise files
9494
.mise.toml
9595
/errors/
96+
go/flags/endtoend/count_flags.sh

config/tablet/default.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
tabletID: zone-1234
22

33
init:
4-
dbName: # init_db_name_override
5-
keyspace: # init_keyspace
6-
shard: # init_shard
7-
tabletType: # init_tablet_type
4+
dbName: # init-db-name-override
5+
keyspace: # init-keyspace
6+
shard: # init-shard
7+
tabletType: # init-tablet-type
88
timeoutSeconds: 60 # init_timeout
99

1010
db:
11-
socket: # db_socket
12-
host: # db_host
13-
port: 0 # db_port
14-
charSet: # db_charset
15-
flags: 0 # db_flags
16-
flavor: # db_flavor
17-
sslCa: # db_ssl_ca
18-
sslCaPath: # db_ssl_ca_path
19-
sslCert: # db_ssl_cert
20-
sslKey: # db_ssl_key
21-
serverName: # db_server_name
22-
connectTimeoutMilliseconds: 0 # db_connect_timeout_ms
11+
socket: # db-socket
12+
host: # db-host
13+
port: 0 # db-port
14+
charSet: # db-charset
15+
flags: 0 # db-flags
16+
flavor: # db-flavor
17+
sslCa: # db-ssl-ca
18+
sslCaPath: # db-ssl-ca-path
19+
sslCert: # db-ssl-cert
20+
sslKey: # db-ssl-key
21+
serverName: # db-server-name
22+
connectTimeoutMilliseconds: 0 # db-connect-timeout-ms
2323
app:
2424
user: vt_app # db_app_user
2525
password: # db_app_password
2626
useSsl: true # db_app_use_ssl
2727
preferTcp: false
2828
dba:
29-
user: vt_dba # db_dba_user
30-
password: # db_dba_password
31-
useSsl: true # db_dba_use_ssl
29+
user: vt_dba # db-dba-user
30+
password: # db-dba-password
31+
useSsl: true # db-dba-use-ssl
3232
preferTcp: false
3333
filtered:
3434
user: vt_filtered # db_filtered_user
@@ -87,7 +87,7 @@ gracePeriods:
8787

8888
replicationTracker:
8989
mode: disable # enable_replication_reporter
90-
heartbeatIntervalMilliseconds: 0 # heartbeat_enable, heartbeat_interval
90+
heartbeatIntervalMilliseconds: 0 # heartbeat-enable, heartbeat-interval
9191

9292
hotRowProtection:
9393
mode: disable|dryRun|enable # enable_hot_row_protection, enable_hot_row_protection_dry_run

doc/design-docs/TopoLocks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The implementations of `LockShard` and `CheckShardLocked` differ slightly for al
1515

1616
### Etcd
1717

18-
In Etcd implementation, we use `KeepAlive` API to keep renewing the context that we have for acquiring the shard lock every 10 seconds. The duration of the lease is controlled by the `--topo_etcd_lease_ttl` flag which defaults to 10 seconds. Once we acquire the shard lock, the context for acquiring the shard lock expires and that stops the KeepAlives too.
18+
In Etcd implementation, we use `KeepAlive` API to keep renewing the context that we have for acquiring the shard lock every 10 seconds. The duration of the lease is controlled by the `--topo-etcd-lease-ttl` flag which defaults to 10 seconds. Once we acquire the shard lock, the context for acquiring the shard lock expires and that stops the KeepAlives too.
1919

2020
The shard lock is released either when the unlock function is called, or if the lease ttl expires. This guards against servers crashing while holding the shard lock.
2121

@@ -30,6 +30,6 @@ The Check function doesn't do anything in ZooKeeper. The implementation just ret
3030

3131
### Consul
3232

33-
In Consul, the timeout for the lock is controlled by the `--topo_consul_lock_session_ttl` flag.
33+
In Consul, the timeout for the lock is controlled by the `--topo-consul-lock-session-ttl` flag.
3434

3535
The Check function works properly and checks if the lock still exists.

docker/mini/vtctld-mini-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ grpc_port=15999
2323

2424
echo "- Starting vtctld..."
2525
# shellcheck disable=SC2086
26+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
2627
vtctld \
2728
$TOPOLOGY_FLAGS \
2829
--disable_active_reparents \

docker/mini/vttablet-mini-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ echo "> Starting vttablet for server $mysql_host:$mysql_port"
3939
echo " - Tablet alias is $alias"
4040
echo " - Tablet listens on http://$hostname:$port"
4141
# shellcheck disable=SC2086
42+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
4243
vttablet \
4344
$TOPOLOGY_FLAGS \
4445
-log_dir $VTDATAROOT/tmp \

docker/vttestserver/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ rm -vf "$VTDATAROOT"/"$tablet_dir"/{mysql.sock,mysql.sock.lock}
3636
--num_shards "$NUM_SHARDS" \
3737
--mysql_bind_host "${MYSQL_BIND_HOST:-127.0.0.1}" \
3838
--vtcombo-bind-host "${VTCOMBO_BIND_HOST:-127.0.0.1}" \
39-
--mysql_server_version "${MYSQL_SERVER_VERSION:-$1}" \
39+
--mysql-server-version "${MYSQL_SERVER_VERSION:-$1}" \
4040
--charset "${CHARSET:-utf8mb4}" \
4141
--foreign_key_mode "${FOREIGN_KEY_MODE:-allow}" \
4242
--enable_online_ddl="${ENABLE_ONLINE_DDL:-true}" \

examples/common/env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ if [ "${TOPO}" = "zk2" ]; then
5353
# Set topology environment parameters.
5454
ZK_SERVER="localhost:21811,localhost:21812,localhost:21813"
5555
# shellcheck disable=SC2034
56+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
5657
TOPOLOGY_FLAGS="--topo_implementation zk2 --topo_global_server_address ${ZK_SERVER} --topo_global_root /vitess/global"
5758

5859
mkdir -p "${VTDATAROOT}/tmp"
@@ -61,10 +62,12 @@ elif [ "${TOPO}" = "consul" ]; then
6162
CONSUL_SERVER=127.0.0.1
6263
CONSUL_HTTP_PORT=8500
6364
CONSUL_SERVER_PORT=8300
65+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
6466
TOPOLOGY_FLAGS="--topo_implementation consul --topo_global_server_address ${CONSUL_SERVER}:${CONSUL_HTTP_PORT} --topo_global_root vitess/global/"
6567
mkdir -p "${VTDATAROOT}/consul"
6668
else
6769
ETCD_SERVER="localhost:2379"
70+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
6871
TOPOLOGY_FLAGS="--topo_implementation etcd2 --topo_global_server_address $ETCD_SERVER --topo_global_root /vitess/global"
6972

7073
mkdir -p "${VTDATAROOT}/etcd"

examples/common/scripts/mysqlctl-down.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ uid=$TABLET_UID
2424
printf -v alias '%s-%010d' $cell $uid
2525
echo "Shutting down MySQL for tablet $alias..."
2626

27+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
2728
mysqlctl --tablet_uid $uid shutdown
2829

examples/common/scripts/mysqlctl-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ if [ -d $VTDATAROOT/$tablet_dir ]; then
3535
action='start'
3636
fi
3737

38+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
3839
mysqlctl \
3940
--log_dir $VTDATAROOT/tmp \
4041
--tablet_uid $uid \

examples/common/scripts/vtctld-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ grpc_port=15999
2323

2424
echo "Starting vtctld..."
2525
# shellcheck disable=SC2086
26+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
2627
vtctld \
2728
$TOPOLOGY_FLAGS \
2829
--cell $cell \

0 commit comments

Comments
 (0)