主权项 |
1. A method of writing data in a distributed database having a plurality of nodes, comprising:
receiving a write request at a first member node having a first version of a database; applying the received original write request to both the first version of the database and a journal queue in a single atomic transaction using a processor, comprising:
placing the received write request in the journal, queue of the first member node, wherein the journal queue is associated with the first member node and is configured to store write requests that have not yet been reconciled with a master version of the database on a master node; propagating one or more items in the journal queue to the master node; determining whether a conflict exists between the first version of the database with the write request applied and a master version of the database; in the event that a conflict exists, reconciling a write request with the master version of the database; and in the event that a conflict does not exist:
determining that the first version of the database is in a high availability pair, wherein the high availability pair includes a second version of the database in a second member node; andapplying the received original write request to both the first version of the database and to the second version of the database in the second member node. |