主权项 |
1. A method comprising:
determining, by a master node of a computer network, that a primary database is synchronized with a mirror database, the primary database being hosted on a first node of the computer network, the mirror database being hosted on a second node of the computer network, each of the master node, the first node, and the second node including one or more computers and being coupled to one another by the computer network; and in response to the determining, performing operations comprising:
writing, by a first mirrored write process, one or more changes to data to the primary database and to the mirror database asynchronously and in parallel, wherein writing the one or more changes comprises:
writing the one or more changes to a primary database page stored on the first node; andsending the one or more changes to the mirror database using network communications between the primary and mirror databases, wherein the one or more changes are written to a mirror database page stored on the second node; andwriting, by a second mirrored write process that is different from the first mirrored write process, content of a transaction log memory buffer to the primary database and the mirror database asynchronously and in parallel, the content including a record of the one or more changes, wherein writing the transaction log comprises:
writing the content to a primary database transaction log stored on the first node; andsending the content to the mirror database using the network communications between the primary and mirror databases, wherein the content is written to a mirror database transaction log stored on the second node; andflushing the primary and mirror database transaction logs to a first non-volatile computer readable storage medium of the first node and a second non-volatile computer readable storage medium of the second node, respectively, at predetermined synchronization points, wherein writing the one or more changes to the mirror database page is performed independently of the mirror database transaction log. |