IP Library Granted Patent US 9,047,331
Granted Patent B2
US 9,047,331 · App. 13/092,028 · Granted Jun 2, 2015

Scalable row-store with consensus-based replication

Inventors: Jun Rao (San Jose, CA); Eugene J. Shekita (San Jose, CA); Sandeep Tata (San Jose, CA)
Assignee: International Business Machines Corporation
G06F17/30345G06F17/30575
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,047,331
App. No.
13/092,028
Granted
Jun 2, 2015
Kind
B2
Abstract

A method for updating a scalable row-store, including: receiving an update to a key within a range of keys in a database table, wherein the database table is distributed across nodes in a cluster of computing devices; and replicating the update over a group of the nodes using a consensus-based replication algorithm, wherein the replication algorithm includes completing the update in response to receiving acknowledgement messages from a majority of the nodes in the group indicating that the majority has received notification of the update.

Claims (49)

1. A computer program product, comprising:

a non-transitory computer readable storage device to store a computer readable program, wherein the computer readable program, when executed by a processor within a computer, causes the computer to perform operations for updating a scalable row-store, the operations comprising:

receiving an update to a key within a range of keys in a database table, wherein the database table is distributed across nodes in a cluster of computing devices; and

replicating the update over a group of the nodes using a consensus-based replication algorithm,

wherein the replication algorithm comprises:

receiving the update to the key at a leader node of the group, wherein the leader node adds the update to a local log and appends the update to a commit queue;

sending the update appended to a propose message for the update to follower nodes of the group, wherein the follower nodes append the propose message and update to their respective local logs and to the commit queue;

receiving the acknowledgement messages at the leader node from the majority of the group;

modifying the key in the table at the leader node; and

sending an asynchronous commit message from the leader node to the follower nodes at any time after receiving the acknowledgement messages from the majority of the group, wherein each follower node writes the update to the table database at the follower node in response to the commit message.

2. The computer program product of claim 1 , wherein the computer program product, when executed on the computer, causes the computer to perform additional operations, comprising:

assigning a log sequence number (LSN) to each update for a specific key at the leader node according to a received order; and

applying the updates at each follower node according to the LSN.

3. The computer program product of claim 1 , wherein the computer program product, when executed on the computer, causes the computer to perform additional operations, comprising:

removing log records from the local log of the follower node in response to the leader node being disabled and a new leader node being elected, wherein the removed log records correspond to log records discarded by the leader node between a last committed update and a last LSN in the local log.

4. The computer program product of claim 1 , wherein the commit queue processes updates for different keys in parallel.

5. The computer program product of claim 1 , wherein the computer program product, when executed on a computer, causes the computer to perform additional operations, comprising:

detecting failures in the nodes using a central coordination service, wherein the central coordination service is further configured to elect a new leader node for a cohort in response to a failure of the leader node.

6. A method for updating a scalable row-store, comprising:

receiving an update to a key within a range of keys in a database table, wherein the database table is distributed across nodes in a cluster of computing devices; and

replicating the update over a group of the nodes using a consensus-based replication algorithm,

wherein the replication algorithm comprises:

receiving the update to the key at a leader node of the group, wherein the leader node adds the update to a local log and appends the update to a commit queue;

sending the update appended to a propose message for the update to follower nodes of the group, wherein the follower nodes append the propose message and update to their respective local logs and to the commit queue;

receiving the acknowledgement messages at the leader node from the majority of the group;

modifying the key in the table at the leader node; and

sending an asynchronous commit message from the leader node to the follower nodes at any time after receiving the acknowledgement messages from the majority of the group, wherein each follower node writes the update to the table database at the follower node in response to the commit message.

7. The method of claim 6 , further comprising:

assigning a log sequence number (LSN) to each update for a specific key at the leader node according to a received order; and

applying the updates at each follower node according to the LSN.

8. The method of claim 7 , further comprising removing log records from the local log of the follower node in response to the leader node being disabled and a new leader node being elected, wherein the removed log records correspond to log records discarded by the leader node between a last committed update and a last LSN in the local log.

9. The method of claim 6 , wherein the commit queue processes updates for different keys in parallel.

10. The method of claim 6 , further comprising detecting failures in the nodes using a central coordination service, wherein the central coordination service is further configured to elect a new leader node for a cohort in response to a failure of the leader node.

11. A scalable row-store system, comprising:

a database table distributed across a plurality of nodes in a cluster of computing devices;

a replicator to replicate an update to a key within a range of keys in the database table over a group of the nodes using a consensus-based replication algorithm,

wherein using the replication algorithm comprises:

receiving the update to the key at a leader node of the group, wherein the leader node adds the update to a local log and appends the update to a commit queue;

sending the update appended to a propose message for the update to follower nodes of the group, wherein the follower nodes append the propose message and update to their respective local logs and to the commit queue;

receiving the acknowledgement messages at the leader node from the majority of the group;

modifying the key in the table at the leader node; and

sending an asynchronous commit message from the leader node to the follower nodes at any time after receiving the acknowledgement messages from the majority of the group, wherein each follower node writes the update to the table database at the follower node in response to the commit message.

12. The system of claim 11 , wherein the replication algorithm is further configured to:

assign a log sequence number (LSN) to each update for a specific key at the leader node according to a received order; and

apply the updates at each follower node according to the LSN.

13. The system of claim 12 , wherein the replication algorithm is further configured to remove log records from the local log of the follower node in response to the leader node being disabled and a new leader node being elected, wherein the removed log records correspond to log records discarded by the leader node between a last committed update and a last LSN in the local log.

14. The system of claim 11 , further comprising a central coordination service configured to:

detect failures in the nodes; and

elect a new leader node for a cohort in response to a failure of the leader node.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2011
From: RAO, JUN; SHEKITA, EUGENE J; TATA, SANDEEP
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 026166/0334 →
Continuity (1)
Related Publication 20120271795A1 · Oct 25, 2012