Generating database sequences in a replicated database environment
First Claim
1. A computer-implemented_method for generating database sequences in a replicated database environment, comprising:
- providing, by a processor, a group of nodes each hosting an instance of a replicated database, with one node in the group elected as a master node responsible for generating and distributing values for auto-generated values in a column or row of the replicated database;
dividing, by the processor in the master node, a sequence space of possible auto-generated values for the column or row into sub-ranges and assigning a sub-range to a particular node in the group of nodes, wherein the auto-generated values are dividable into sub-network groups by a partition or node failure;
recombining, by the processor, the sub-network group when one or more of the group of nodes rejoins the group of nodes, wherein recombining comprises;
determining, by the processor, whether any one or more of the group of nodes is unable to reconnect with the master node;
forming a sub-network comprising the one or more of the group of nodes unable to reconnect with the master node; and
electing, by the processor, a new master node for the sub-network; and
distributing, by the processor in the new master node, values of the assigned sub-range to a particular node of the group of nodes,wherein the values are assigned based on a message from the one or more of the group of nodes rejoining the group indicative that the one or more of the group of nodes is rejoining, wherein the new master node claims a sub-range having a smaller portion of a sequence of sub-space than the portion claimed by the master node;
dividing, by the original and new master node or nodes, the sequence space of possible auto-generated values into sub-spaces for each group of nodes according to a size of each group of nodes; and
for the new master node or nodes, assigning a sub-range for a particular node in the group of nodes.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments relate to generating database sequences in a replicated database environment. An aspect includes providing a group of nodes each hosting an instance of a replicated database, with one node in the group elected as a master node responsible for generating and distributing values for auto-generated values in a column or row of the replicated database. Another aspect includes dividing, by the master node, a sequence space of possible auto-generated values for the column or row into sub-ranges and assigning a sub-range to a particular node in the group of nodes. Another aspect includes distributing, by the master node, values of the assigned sub-range to a particular node of the group of nodes.
-
Citations
18 Claims
-
1. A computer-implemented_method for generating database sequences in a replicated database environment, comprising:
-
providing, by a processor, a group of nodes each hosting an instance of a replicated database, with one node in the group elected as a master node responsible for generating and distributing values for auto-generated values in a column or row of the replicated database; dividing, by the processor in the master node, a sequence space of possible auto-generated values for the column or row into sub-ranges and assigning a sub-range to a particular node in the group of nodes, wherein the auto-generated values are dividable into sub-network groups by a partition or node failure; recombining, by the processor, the sub-network group when one or more of the group of nodes rejoins the group of nodes, wherein recombining comprises; determining, by the processor, whether any one or more of the group of nodes is unable to reconnect with the master node; forming a sub-network comprising the one or more of the group of nodes unable to reconnect with the master node; and electing, by the processor, a new master node for the sub-network; and distributing, by the processor in the new master node, values of the assigned sub-range to a particular node of the group of nodes, wherein the values are assigned based on a message from the one or more of the group of nodes rejoining the group indicative that the one or more of the group of nodes is rejoining, wherein the new master node claims a sub-range having a smaller portion of a sequence of sub-space than the portion claimed by the master node; dividing, by the original and new master node or nodes, the sequence space of possible auto-generated values into sub-spaces for each group of nodes according to a size of each group of nodes; and for the new master node or nodes, assigning a sub-range for a particular node in the group of nodes. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer-implemented system for generating database sequences in a replicated database environment, comprising:
-
a group of nodes each hosting, by a processor at each node, an instance of a replicated database, with one node in the group elected, by a processor, as a master node responsible for generating and distributing values for auto-generated values in a column or row of the replicated database; the master node comprising a sub-range allocating component that divides, by the processor on the master node, a sequence space of possible auto-generated values for the column or row into sub-ranges and assigning, by the processor on the master node, a sub-range to a particular node in the group of nodes, and recombines the sub-network group when one or more of the group of nodes rejoins the group of nodes, wherein the processor is configured to; determine whether any one or more of the group of nodes is unable to reconnect with the master node; form a sub-network comprising the one or more of the group of nodes unable to reconnect with the master node; and elect a new master node for the sub-network; and the master node further comprising a demand receiving and value generating component that distributes, by the processor on the new master node, values of the assigned sub-range to a particular node, wherein the values are assigned based on a message from the one or more of the group of nodes rejoining the group indicative that the one or more of the group of nodes is rejoining, and wherein the new master node claims a sub-range having a smaller portion of a sequence of subspace than the portion claimed by the master node; and a sequence sub-space generating component that divides, by the processor on the master node and new master node or nodes, the sequence space of possible auto-generated values into sub-spaces for each group of nodes according to a size of each group of node; for the new master node or nodes, assigning a sub-range for a particular node in the group of nodes. - View Dependent Claims (12, 13, 14, 15, 16, 17)
-
-
18. A non-transitory computer readable storage medium storing thereupon a computer program product for generating database sequences, the computer program product comprising computer-readable program code embodied therewith, the computer-readable program code configured to, when executed:
-
divide, by a processor in a replicated database environment having a group of nodes each hosting an instance of a replicated database, with one node in the group elected as a master node responsible for generating and distributing values for auto-generated values in a column or row of the replicated database, a sequence space of possible auto-generated values for the column or row into sub-ranges and assigning a sub-range to a particular node in the group of nodes, wherein the auto-generated values are dividable into sub-network groups by a partition or node failure; recombine, by the processor, the sub-network group when one or more of the group of nodes rejoins the group of nodes, wherein recombining comprises; determining, by the processor, whether any one or more of the group of nodes is unable to reconnect with the master node; forming a sub-network comprising the one or more of the group of nodes unable to reconnect with the master node; and electing, by the processor, a new master node for the sub-network; and distributing, by the processor, values of the assigned sub-range to a particular node of the group of nodes, wherein the values are assigned based on a message from the one or more of the group of nodes rejoining the group indicative that the one or more of the group of nodes is rejoining, and wherein the new master node claims a sub-range having a smaller portion of a sequence of sub-space than the portion claimed by the master node; dividing, by the original and new master node or nodes, the sequence space of possible auto-generated values into sub-spaces for each group of nodes according to a size of each group of nodes; and for the new master node or nodes, assigning a sub-range for a particular node in the group of nodes.
-
Specification