Master replication drain on server shutdown