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

Migrating from master-slave terminology #6

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/mysql_gadgets/command/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ def create_sandbox(**kwargs):
"log_error": os.path.join(datadir, "error.log").replace("\\", "/"),
"relay_log_info_repository": "TABLE",
"binlog_checksum": "NONE",
"master_info_repository": "TABLE",
"main_info_repository": "TABLE",
"gtid_mode": "ON",
"log_slave_updates": "ON",
"log_subordinate_updates": "ON",
"transaction_write_set_extraction": "XXHASH64",
"binlog_format": "ROW",
"log_bin": None,
Expand Down
2 changes: 1 addition & 1 deletion python/mysql_gadgets/common/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def __init__(self, options):
object. Supported key values:
conn_info a dictionary containing connection information
(user, passwd, host, port, socket)
role Name or role of server (e.g., server, master)
role Name or role of server (e.g., server, main)
verbose print extra data during operations (optional)
default value = False
charset Default character set for the connection.
Expand Down
6 changes: 3 additions & 3 deletions unittest/scripts/auto/py_adminapi/validation/dba_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
instance will attempt to rejoin the cluster after being expelled.
- clearReadOnly: boolean value used to confirm that super_read_only must
be disabled. Deprecated.
- multiMaster: boolean value used to define an InnoDB cluster with
- multiMain: boolean value used to define an InnoDB cluster with
multiple writable instances. Deprecated.

An InnoDB cluster may be setup in two ways:
Expand Down Expand Up @@ -664,7 +664,7 @@

ATTENTION: The clearReadOnly option will be removed in a future release.

ATTENTION: The multiMaster option will be removed in a future release.
ATTENTION: The multiMain option will be removed in a future release.
Please use the multiPrimary option instead.

ATTENTION: The failoverConsistency option will be removed in a future
Expand Down Expand Up @@ -711,7 +711,7 @@
The created replicaset object.

DESCRIPTION
This function will create a managed replicaset using MySQL master/slave
This function will create a managed replicaset using MySQL main/subordinate
replication, as opposed to Group Replication. The MySQL instance the
shell is connected to will be the initial PRIMARY of the replica set.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
| "mode": "R/O", |
| "replication": {|
| "applierStatus": "APPLIED_ALL", |
| "applierThreadState": "Slave has read all relay log; waiting for more updates", |
| "applierThreadState": "Subordinate has read all relay log; waiting for more updates", |
| "receiverStatus": "ERROR", |
| "receiverThreadState": "", |
| "replicationLag": null|
Expand All @@ -194,7 +194,7 @@
| "mode": "R/O", |
| "replication": {|
| "applierStatus": "APPLIED_ALL", |
| "applierThreadState": "Slave has read all relay log; waiting for more updates", |
| "applierThreadState": "Subordinate has read all relay log; waiting for more updates", |
| "receiverStatus": "ERROR", |
| "receiverThreadState": "", |
| "replicationLag": null|
Expand Down Expand Up @@ -338,9 +338,9 @@
"mode": "R/O",
"replication": {
"applierStatus": "APPLIED_ALL",
"applierThreadState": "Slave has read all relay log; waiting for more updates",
"applierThreadState": "Subordinate has read all relay log; waiting for more updates",
"receiverStatus": "ON",
"receiverThreadState": "Waiting for master to send event",
"receiverThreadState": "Waiting for main to send event",
"replicationLag": null
},
"status": "ONLINE"
Expand Down
26 changes: 13 additions & 13 deletions unittest/scripts/py_devapi/setup/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,49 +127,49 @@ def check_super_read_only_done(connection):


recov_cluster = None
recov_master_uri = None
recov_slave_uri = None
recov_main_uri = None
recov_subordinate_uri = None
recov_state_list = None


def _check_slave_state():
def _check_subordinate_state():
global recov_cluster
global recov_slave_uri
global recov_subordinate_uri
global recov_state_list

full_status = recov_cluster.status()
slave_status = full_status.defaultReplicaSet.topology[
recov_slave_uri].status
subordinate_status = full_status.defaultReplicaSet.topology[
recov_subordinate_uri].status

print("--->%s: %s" % (recov_slave_uri, slave_status))
print("--->%s: %s" % (recov_subordinate_uri, subordinate_status))

ret_val = False
for state in recov_state_list:
if state == slave_status:
if state == subordinate_status:
ret_val = True
print("Done!")
break

return ret_val


def wait_slave_state(cluster, slave_uri, states):
def wait_subordinate_state(cluster, subordinate_uri, states):
global recov_cluster
global recov_slave_uri
global recov_subordinate_uri
global recov_state_list

recov_cluster = cluster
recov_slave_uri = slave_uri
recov_subordinate_uri = subordinate_uri

if type(states) is list:
recov_state_list = states
else:
recov_state_list = [states]

print("WAITING for %s to be in one of these states: %s" % (slave_uri,
print("WAITING for %s to be in one of these states: %s" % (subordinate_uri,
states))

wait(60, 1, _check_slave_state)
wait(60, 1, _check_subordinate_state)

recov_cluster = None

Expand Down