When the Controller is set up for High Availability, users see a "Controller disabled on this host" message on the secondary Controller when a partial replication is run and full replication with the -f
flag is not yet complete.
When a replication runs without the -f
flag, it copies the MySQL data and index files from the primary server to the secondary while App Server (Glassfish) runs on the primary server. There may be tables updated by App Server thus changing the underlying data files, but these files may have already been copied over to the secondary server. This is an incremental sync.
Running a replication with the -f flag stops the Controller on the primary server, ensuring that no files will change, then compares the files between the primary and secondary servers and only copies those that are different. This is final sync.
More incremental syncs create less downtime when running a replication with the -f
flag, as there are fewer files to copy in the direct sync.
To ensure MySQL does not start on secondary server until the final sync is complete, replicate script deletes the <controller_home>/bin/controller.sh
file on the secondary server until the replication is finished and hence the message "Controller disabled on this host" so that controller cannot be started on secondary. Once the final replication completes,<controller_home>/bin/controller.sh is automatically copied from primary to secondary server and MySQL on secondary server is started.