GTID & GTID Replication Flashcards

1
Q

True or False:

Split-brain is unavoidable.

A

False

there is also a built-in, automatic, split-brain protection mechanism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which statements are true about asynchronous replication:

a) The primary executes transactions, commits them and then they are later sent to the secondaries to be either re-executed or applied
b) It is a shared-nothing system, where all servers have a full copy of the data by default.
c) the Primary waits, at commit time, for the secondary to acknowledge that it has received the transaction
d) re-executed transactions are statement-based replication
e) applied transactions are statement-based replication

A

a) b) d)

The primary executes transactions, commits them and then they are later (thus asynchronously) sent to the secondaries to be either re-executed (in statement-based replication) or applied (in row-based replication).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which statements are true about semi synchronous replication (pick 2):

a) messages exchanged between servers or messages exchanged between servers and the client application can occur before the source commits
b) the Primary waits, at commit time, for the secondary to acknowledge that it has received the transaction
c) It is a shared-nothing system, where all servers have a full copy of the data by default.

A

a) b)

messages exchanged between servers or messages exchanged between servers and the client application can occur before the source commits

the Primary waits, at commit time, for the secondary to acknowledge that it has received the transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which statements are true about group replication (pick 3):

a) all read-write transactions commit only after they have been approved by the group
b) after read-write transaction is committed, the commit operation is a unilateral decision from the originating server
c) is formed by multiple servers and each server in the group may execute transactions independently at any time
d) Read-only transactions need no coordination within the group and commit immediately

A

a) c) d)

the commit operation is NOT a unilateral decision from the originating server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the correct sequence of events after a read-write transaction is committed:

a) a read-write transaction is ready to commit at the originating server
b) the corresponding write set (the unique identifiers of the rows that were updated).
c) either all servers in the group receive the transaction or none do
d) the server atomically broadcasts the write values (the rows that were changed)
e) If servers receive the transaction, then they all receive it in the same order with respect to other transactions that were sent before
f) All servers therefore receive the same set of transactions in the same order, and a global total order is established for the transactions.

A

a) –> d) –> b) –> c) –> e) –> f)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the correct sequence of events during the certification process:

a) the transaction that was ordered first commits on all servers
b) the transaction ordered second aborts is rolled back on the originating server
c) the transaction ordered second aborts
d) at the row-level, conflicts are detected by inspecting and comparing the write sets of two different and concurrent transactions
e) the transaction ordered second aborts is dropped by the other servers in the group

A

d) –> a) –> c) –> b) –> e)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or False:

For applying and externalizing the certified transactions, Group Replication permits servers to deviate from the agreed order of the transactions if this does not break consistency and validity.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False:

Group Replication is an instant consistency system, meaning that all group members have the same data content at all times.

A

False

Group Replication is an eventual consistency system, meaning that as soon as the incoming traffic slows down or stops, all group members have the same data content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

True or False:

In single-primary mode, on the primary server, there is a small chance that concurrent, non-conflicting local transactions might be committed and externalized in a different order from the global order agreed by Group Replication

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

True or False:

In single-primary mode, transactions on secondaries are not always committed and externalized in the agreed order.

A

False

On the secondaries, which do not accept writes from clients, transactions are always committed and externalized in the agreed order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In Group Replication, consensus takes place after:

a) the certification process
b) transaction is recorded in the relay log
c) transaction is executed
d) transaction is applied to the binlog

A

c)

https://dev.mysql.com/doc/refman/5.7/en/group-replication-summary.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

True or False:

in the event of an unexpected server exit, the primary server redirects clients to a different server

A

False

in the event of an unexpected server exit, those clients connected to it must be redirected, or failed over, to a different server. This is not something Group Replication attempts to resolve. A connector, load balancer, router, or some form of middleware are more suitable to deal with this issue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which is a use case for group replication (pick 3) :

a) Environments that require a very fluid replication infrastructure, where the number of servers has to grow or shrink dynamically and with as few side-effects as possible.
b) where downtime is not an issue
c) Writing to an entire group may prove more scalable under certain circumstances
d) to implement highly available shards, where each shard maps to a replication group.

A

a) c) d)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False:

If a server joins the group, it automatically brings itself up to date by fetching the missing state from an existing server.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False:

If a server leaves the group, the remaining servers notice that it has left and DBA must reconfigure the group.

A

False

If a server leaves the group, for instance it was taken down for maintenance, the remaining servers notice that it has left and reconfigure the group automatically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which is true about a view (pick 2):

a) Group members must agree on either the transaction commits or the current view.
b) reconfiguration of the group triggers a view change.
c) The list of online servers is referred to as a view.

A

b) c)

Group members must agree not only on transaction commits, but also on which is the current view

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True or False:

It is possible for a member to go offline for a short time, then attempt to rejoin the group again before the failure detection mechanism has detected its failure, which can cause issues including possible data inconsistency.

A

True

It is possible for a member to go offline for a short time, then attempt to rejoin the group again before the failure detection mechanism has detected its failure, and before the group has been reconfigured to remove the member. In this situation, the rejoining member forgets its previous state, but if other members send it messages that are intended for its pre-crash state, this can cause issues including possible data inconsistency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

True or False

From MySQL 5.7.22, servers are given a unique identifier when they join a group.

A

True

from MySQL 5.7.22, servers are given a unique identifier when they join a group. This enables Group Replication to be aware of the situation where a new incarnation of the same server (with the same address but a new identifier) is trying to join the group while its old incarnation is still listed as a member. The new incarnation is blocked from joining the group until the old incarnation can be removed by a reconfiguration. If Group Replication is stopped and restarted on the server, the member becomes a new incarnation and cannot rejoin until the suspicion times out.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Which are true about point-to-point communication channel (pick 4):

a) These connections use TCP/IP sockets.
b) connections are managed by the group communication engine
c) A member cannot create a suspicion of itself failing.
d) If a member does not receive messages from another member for 5 seconds, it suspects that the member has failed, and lists the status of that member as UNREACHABLE
e) each member has a point-to-point communication channel to each other member

A

a) b) d) e)

A member can also create a suspicion of itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which 2 group sizes can tolerate 2 servers failing?

a) 4
b) 5
c) 6
d) 7

A

b) c)

group size of 4 can tolerate 1 failure.

group size of 7 can tolerate 3 failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which 2 group sizes need 3 members to agree for majority?

a) 4
b) 5
c) 6
d) 7

A

a) b)

Groups of 6 and 7 need 4 members to agree to form consensus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which system variable:

Allows the current server to join the group even if it has a lower major version than the group.

A

–group-replication-allow-local-lower-version-join[={OFF | ON}]

Scope Global
Dynamic Yes
Default Value OFF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which system variable:

Determines the interval between successive column values for transactions that execute on this server instance

A

–group-replication-auto-increment-increment=#

Scope Global
Dynamic Yes
Default Value 7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which system variable:

Configures the server to bootstrap the group. This option must only be set on one server and only when starting the group for the first time or restarting the entire group

A

–group-replication-bootstrap-group[={OFF | ON}]

Scope Global
Dynamic Yes
Default Value OFF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which system variable:

Indicates timeout, in seconds, that Group Replication waits for each of the components when shutting down.

A

–group-replication-components-stop-timeout=#

Scope Global
Dynamic Yes
Default Value 31536000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Which system variable:

Indicates the threshold value in bytes above which compression is applied to messages sent between group members

A

–group-replication-compression-threshold=#

If this system variable is set to zero, compression is disabled.

Scope Global
Dynamic Yes
Default Value 1000000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Which system variable:

Enables or disables strict consistency checks for multi-primary update everywhere.

A

–group-replication-enforce-update-everywhere-checks[={OFF | ON}]

Scope Global
Dynamic Yes
Default Value OFF

28
Q

Which system variable:

Configures how Group Replication behaves when a server instance leaves the group unintentionally

A

–group-replication-exit-state-action=value

Scope Global
Dynamic Yes
Default Value READ_ONLY

Valid Values
ABORT_SERVER

READ_ONLY

29
Q

Which system variable:

Specifies the number of waiting transactions in the applier queue that trigger flow control.

A

–group-replication-flow-control-applier-threshold=#

This variable can be changed without resetting Group Replication.

Scope Global
Dynamic Yes
Default Value 25000
Unit transactions

30
Q

Which system variable:

Specifies the number of waiting transactions in the certifier queue that trigger flow control.

A

–group-replication-flow-control-certifier-threshold=#

This variable can be changed without resetting Group Replication.

Scope Global
Dynamic Yes
Default Value 25000

31
Q

Which system variable:

Defines what percentage of the group quota remains unused to allow a cluster under flow control to catch up on backlog.

A

–group-replication-flow-control-hold-percent=#

A value of 0 implies that no part of the quota is reserved for catching up on the work backlog.

Scope Global
Dynamic Yes
Default Value 10

32
Q

Which system variable:

Defines the maximum flow control quota of the group, or the maximum available quota for any period while flow control is enabled.

A

–group-replication-flow-control-max-commit-quota=#

A value of 0 implies that there is no maximum quota set. Cannot be smaller than group_replication_flow_control_min_quota and group_replication_flow_control_min_recovery_quota.

Scope Global
Dynamic Yes
Default Value 0

33
Q

Which option:

Defines the percentage of the quota that a member should assume is available for itself when calculating the quotas

A

–group-replication-flow-control-member-quota-percent=#

A value of 0 (default) implies that the quota should be split equally between members that were writers in the last period.

Scope Global
Dynamic Yes
Default Value 0

34
Q

Which option:

Defines the percentage of the quota that a member should assume is available for itself when calculating the quotas

A

–group-replication-flow-control-member-quota-percent=#

A value of 0 (default) implies that the quota should be split equally between members that were writers in the last period.

Scope Global
Dynamic Yes

35
Q

Which option:

Controls the lowest flow control quota that can be assigned to a member, independently of the calculated minimum quota executed in the last period.

A

–group-replication-flow-control-min-quota=#

A value of 0 (default) implies that there is no minimum quota. Cannot be larger than group_replication_flow_control_max_commit_quota.

Scope Global
Dynamic Yes

36
Q

Which option:

Specifies the mode used for flow control.

A

–group-replication-flow-control-mode=value

This variable can be changed without resetting Group Replication.

Scope Global
Dynamic Yes
Default Value QUOTA

37
Q

Which system variable:

Defines the percentage of the quota that a member should assume is available for itself when calculating the quotas

A

–group-replication-flow-control-member-quota-percent=#

A value of 0 (default) implies that the quota should be split equally between members that were writers in the last period.

Scope Global
Dynamic Yes

38
Q

Which system variable:

Controls the lowest flow control quota that can be assigned to a member, independently of the calculated minimum quota executed in the last period.

A

–group-replication-flow-control-min-quota=#

A value of 0 (default) implies that there is no minimum quota. Cannot be larger than group_replication_flow_control_max_commit_quota.

Scope Global
Dynamic Yes

39
Q

Which system variable:

Specifies the mode used for flow control.

A

–group-replication-flow-control-mode=value

This variable can be changed without resetting Group Replication.

Scope Global
Dynamic Yes
Default Value QUOTA

40
Q

Which system variable:

is used to force a new group membership, in which the excluded members do not receive a new view and are blocked.

A

–group-replication-force-members=value

A list of peer addresses as a comma separated list such as host1:port1,host2:port2

You must specify the address or host name and port as they are given in the group_replication_local_address option for each member.

Scope Global
Dynamic Yes

41
Q

Which system variable:

names the group of which this server instance belongs to.

A

–group-replication-group-name=value

Must be a valid UUID. This UUID is used internally when setting GTIDs for Group Replication events in the binary log.

Scope Global
Dynamic Yes

42
Q

Which system variable:

lists of group members to which a joining member can connect to obtain details of all the current group members.

A

–group-replication-group-seeds=value

The joining member uses these details to select and connect to a group member to obtain the data needed for synchrony with the group

Scope Global
Dynamic Yes

43
Q

Which system variable:

represents the number of consecutive GTIDs that are reserved for each member.

A

–group-replication-gtid-assignment-block-size=#

Scope Global
Dynamic Yes
Default Value 1000000

44
Q

Which system variable:

Specifies the allowlist of hosts that are permitted to connect to the group.

A

–group-replication-ip-whitelist=value

The address that you specify for each group member in group_replication_local_address must be allowlisted on the other servers in the replication group.

Scope Global
Dynamic Yes
Default Value AUTOMATIC

45
Q

Which system variable:

lists the network address which the member provides for connections from other members, specified as a host:port formatted string.

A

–group-replication-local-address=value

Communication with the local instance is over an input channel using shared memory.

Scope Global
Dynamic Yes

46
Q

Which system variable:

Specifies the percentage weight that can be assigned to members to influence the chance of the member being elected as primary in the event of failover

A

–group-replication-member-weight=#

Assign numeric weights to members to ensure that specific members are elected,

Scope Global
Dynamic Yes
Default Value 50

47
Q

Which system variable:

Specifies the number of times the group communication thread waits for the communication engine mutex to be released before the thread waits for more incoming network messages.

A

–group-replication-poll-spin-loops=#

Scope Global
Dynamic Yes
Default Value 0

48
Q

Which system variable:

Specifies the number of times that the member that is joining tries to connect to the available donors before giving up.

A

–group-replication-recovery-retry-count=#

Scope Global
Dynamic Yes
Default Value 10

49
Q

Which system variable:

represents the sleep time, in seconds, between reconnection attempts when no donor was found in the group.

A

–group-replication-recovery-reconnect-interval=#

Scope Global
Dynamic Yes
Default Value 60

50
Q

Which system variable:

Indicates whether Group Replication recovery connection should use SSL or not.

A

–group-replication-recovery-use-ssl[={OFF | ON}]

Scope Global
Dynamic Yes
Default Value OFF

51
Q

Which system variable:

Indicates the path to a file that contains a list of trusted SSL certificate authorities.

A

–group-replication-recovery-ssl-ca=value

Scope Global
Dynamic Yes

52
Q

Which system variable:

Indicates the path to a directory that contains trusted SSL certificate authority certificates.

A

–group-replication-recovery-ssl-capath=value

Scope Global
Dynamic Yes

53
Q

Which system variable:

Is the name of the SSL certificate file to use for establishing a secure connection.

A

–group-replication-recovery-ssl-cert=value

Scope Global
Dynamic Yes

54
Q

Which system variable:

names the SSL key file to use for establishing a secure connection.

A

–group-replication-recovery-ssl-key=value

Scope Global
Dynamic Yes

55
Q

Which system variable:

lists the permissible ciphers for SSL encryption.

A

–group-replication-recovery-ssl-cipher=value

Scope Global
Dynamic Yes

56
Q

Which system variable:

names the path to a directory that contains files containing certificate revocation lists.

A

–group-replication-recovery-ssl-crl=value

Scope Global
Dynamic Yes

57
Q

Which system variable:

names the path to a directory that contains files containing certificate revocation lists.

A

–group-replication-recovery-ssl-crlpath=value

Scope Global
Dynamic Yes

58
Q

Which system variable:

Makes the recovery process check the server’s Common Name value in the donor sent certificate.

A

–group-replication-recovery-ssl-verify-server-cert[={OFF | ON}]

Scope Global
Dynamic Yes

59
Q

Which system variable:

specifies whether a member is marked online after it has received all transactions that it missed before it joined the group (TRANSACTIONS_CERTIFIED) or after it has received and applied them (TRANSACTIONS_APPLIED).

A

–group-replication-recovery-complete-at=value

Recovery policies when handling cached transactions after state transfer

Scope Global
Dynamic Yes
Default Value TRANSACTIONS_APPLIED

60
Q

Which system variable:

Instructs the group to automatically pick a single server to be the one that handles read/write workload

A

–group-replication-single-primary-mode[={OFF | ON}]

This server is the PRIMARY and all others are SECONDARIES.

Scope Global
Dynamic Yes
Default Value ON

61
Q

Which system variable:

Specifies the security state of the connection between Group Replication members.

A

–group-replication-ssl-mode=value

Scope Global
Dynamic Yes
Default Value DISABLED

Valid Values DISABLED, REQUIRED, VERIFY_CA, VERIFY_IDENTITY

62
Q

Which system variable:

Instructs the the server should start Group Replication or not during server start.

A

–group-replication-start-on-boot[={OFF | ON}]

Scope Global
Dynamic Yes
Default Value ON

63
Q

Which system variable:

Configures the maximum transaction size in bytes which the replication group accepts

A

–group-replication-transaction-size-limit=#

Transactions larger than this size are rolled back by the receiving member and are not broadcast to the group.

Scope Global
Dynamic Yes
Default Value (≥ 5.7.38) 150000000

64
Q

Which system variable:

Configures how long members that suffer a network partition and cannot connect to the majority wait before leaving the group.

A

–group-replication-unreachable-majority-timeout=#

When you have a symmetric group, with just two members for example (S0,S2), if there is a network partition and there is no majority, after the configured timeout all members enter ERROR state.

Scope Global
Dynamic Yes
Default Value 0

65
Q

Which status variable:

Shows the primary member’s UUID when the group is operating in single-primary mode

A

group_replication_primary_member

If the group is operating in multi-primary mode, shows an empty string