Which command set would make the slave current?

An existing master-slave setup is currently using a delayed replication of one hour. The
master has crashed and the slave must be ”rolled forward” to provide all the latest data. The
SHOW SLAVE STATUS indicates the following values: RELAY_LOG_FILE =
hostname-relay-bin.00004 RELAY_LOG_POS = 1383 Which command set would make the
slave current?

An existing master-slave setup is currently using a delayed replication of one hour. The
master has crashed and the slave must be ”rolled forward” to provide all the latest data. The
SHOW SLAVE STATUS indicates the following values: RELAY_LOG_FILE =
hostname-relay-bin.00004 RELAY_LOG_POS = 1383 Which command set would make the
slave current?

A.
STOP SLAVE; CHANGE MASTER TO MASTER_DELAY =0, RELAY_LOG_FILE =
‘hostnamerelay- bin.00004’ , RELAY_LOG_POS = 1383;

B.
STOP SLAVE; CHANGE MASTER TO RELAY_LOG_FILE =
‘hostname-relay-bin.00004’, RELAY_LOG_POS = 1383;

C.
STOP SLAVE; CHANGE MASTER TO MASTER_DELAY=0; START SLAVE;

D.
STOP SLAVE; SET GLOBAL master_delay =0; START SLAVE;

Explanation:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Stan

Stan

The correct answer is A.

CHANGE MASTER TO MASTER_DELAY = 0, RELAY_LOG_FILE = ‘xxxxx-relay-bin.######’, RELAY_LOG_POS = ######;
START SLAVE;
Since delayed replication only delays playback from the relay log — not the receiving of events from the master — your relay log should have everything up until “now” (or whenever the master was actually lost), so this should bring your slave current.

igbinigun

igbinigun

NO start in A option. C is correct