Method and system for discarding locally committed transactions to ensure consistency in a server cluster
First Claim
1. In a cluster of nodes, a method of recording and retrieving cluster modification data, comprising, associating a sequence number with each set of cluster modification data, recording each set of modification data in association with the sequence number at a log on a common storage device that is accessible to each node capable of forming a new cluster, adjusting the sequence number at each node each time that modification data is successfully replicated to that node, detecting unsuccessfully replicated sets of modification data by retrieving sets of modification data with the sequence number associated therewith from the log on the common storage device, and for each set of modification data retrieved, if the sequence number associated therewith is unique within the log, updating data of a node with the modification data from the log, and if the sequence number is not unique within the log and thereby indicative of at least one unsuccessful replication, determining which set of modification data associated with that sequence number was recorded later in time, and updating data of the node with the later recorded modification data.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for forming a new cluster of servers having state data that is consistent with the state data of a cluster that previously existed. The previous cluster preserves its state data by recording transactions to a log file in conjunction with a sequence number maintained by each node. The node that recorded the transaction then increments its copy of the sequence number and attempts to replicate the transaction to other nodes of the cluster. If the transaction is replicated, each other node commits the transaction and increments its sequence number. If the node fails before it can replicate the transaction, then no other nodes will increment their sequence numbers, whereby the next logged transaction has the same sequence number as the previously logged, but orphaned replicated transaction. When a new node forms a cluster, it unrolls the log file so as to become consistent with the state of the previous cluster. Logged transactions having duplicate sequence numbers indicate that the first such transaction was not fully replicated. To remain consistent, the first transaction is discarded and not used to update the state of the new cluster.
222 Citations
24 Claims
- 1. In a cluster of nodes, a method of recording and retrieving cluster modification data, comprising, associating a sequence number with each set of cluster modification data, recording each set of modification data in association with the sequence number at a log on a common storage device that is accessible to each node capable of forming a new cluster, adjusting the sequence number at each node each time that modification data is successfully replicated to that node, detecting unsuccessfully replicated sets of modification data by retrieving sets of modification data with the sequence number associated therewith from the log on the common storage device, and for each set of modification data retrieved, if the sequence number associated therewith is unique within the log, updating data of a node with the modification data from the log, and if the sequence number is not unique within the log and thereby indicative of at least one unsuccessful replication, determining which set of modification data associated with that sequence number was recorded later in time, and updating data of the node with the later recorded modification data.
-
11. A system for forming a new cluster of nodes having state data that is consistent with the state data of a previous cluster of nodes, comprising:
-
a storage device having a log file thereon accessible by at least one of the nodes of the previous cluster and a node forming the new cluster;
the previous cluster including a plurality of nodes, a mechanism for replicating transactions comprising cluster state data to each of the nodes, a mechanism for recording transactions to the log file, each transaction recorded in conjunction with a sequence number provided by a node associated with that transaction, and each node including a mechanism for adjusting a value of the sequence number in response to a transaction committed thereby; and
the node forming the new cluster including a process for reading the log file and updating the cluster state data of said node based on the transactions in the log file, the process using one transaction per sequence number by comparing the sequence numbers of the transactions recorded in the log file and detecting and handling a partially committed transaction by discarding any transaction therein that precedes another transaction having the same sequence number. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A method for forming a new cluster of nodes having state data that is consistent with the state data of a previous cluster of nodes, comprising:
-
preserving the state data of the previous cluster by;
recording transactions comprising state data information to a log file in conjunction with a sequence number provided by a node associated with that transaction;
replicating at least some of the transactions comprising cluster state data to each of the nodes, each node having a transaction replicated thereto committing each transaction and adjusting a local copy of the sequence number; and
,forming a new cluster at a new node by;
reading the log file;
comparing the sequence numbers of the transactions recorded in the log file to detect transactions that were not replicated to each node of the previous cluster;
discarding any transaction in the log file that precedes another transaction having the same sequence number; and
updating the cluster state data of the new node based on the transactions that were not discarded. - View Dependent Claims (18)
-
- 19. A method of forming a new cluster at a node, comprising, accessing sequence numbers associated with sets of state data logged by at least one other node of a previous cluster, selecting at least two of the sequence numbers, evaluating the sequence numbers selected to determine whether any of the sequence numbers are similar, and if so, taking action with respect to at least one set of state data associated with the similar numbers to ensure that the new cluster state is consistent with the previous cluster state.
Specification