Patent ID: 8918364

Claim:
A method of transitioning between mirror states in a mirrored pair of databases comprising an original primary database and an original mirror database, the method comprising: identifying a communications loss between the mirrored original primary and original mirror databases; in response to identifying the communications loss, choosing by a master server which of the databases of the mirrored pair will be a new primary database, and identifying the other of the mirrored pair as a new mirror database, wherein the master server can choose either the original primary database or the original mirror database to be the new primary database; transitioning to a change-tracking mirror state in which transactions continue to create changes to data in the new primary database; tracking, during the change-tracking mirror state, the changes to the data and copying the changes to the data from a transaction log to a change-tracking log; determining that the communications loss between the mirrored new primary and new mirror databases has ended; in response to determining that the communications loss between the mirrored new primary and new mirror databases has ended, transitioning to a re-sync mirror state in which new mirrored database input and output are enabled and in which changes recorded by the change-tracking log are copied to the new mirror database; determining that a commit-intent counter has a value greater than zero; preventing a transition from the re-sync mirror state to an in-sync mirror state while the commit-intent counter has a value greater than zero; decrementing the commit-intent counter each time a persistent file system object table entry has been updated with a new end of file until the commit-intent counter has a value of zero; and transitioning to the in-sync mirror state in response to determining that the commit-intent counter has a value of zero.