Patent ID: 8862936

Claim:
An apparatus for managing a database of an active node of a main memory database management system (MMDBMS) that is replicated from the active node to a standby node, the apparatus comprising: a memory logging unit that records a database log to which a sequence number is sequentially allocated in a log buffer of a memory of the active node; a replicating unit that replicates the database log to the standby node, wherein the standby node maintains a mapping from sequence numbers of database logs received from the active node to sequence numbers of replication logs stored in the standby node, the replication logs corresponding to received database logs, the mapping further associating the sequence numbers of the database logs received to corresponding transactions; a disk flushing unit that periodically flushes the database log to a disk of the active node; and a recovering unit that, when failure of the active node occurs: identifies a database log that is stored in the disk as a last recovered log; transmits a sequence number of the last recovered log to the standby node, receives at least one replication log belonging to a transaction comprising a lost log recorded after the last recovered log from the standby node, wherein the standby node identifies the replication log and the transaction based on the mapping, and recovers the database of the active node based on the at least one replication log.