# US 2008/0306990 A1 · System for performing a redistribute transparently in a multi-node system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0306990 A1
- Document ID: US20080306990A1
- Status: Published application
- Kind: A1
- Application number: 12/194,464
- Filed: 2008-08-19
- Published: 2008-12-11
- Earliest claimed: 2006-01-12
- Assignees: International Business Machines Corporation
- Inventors: Ronen Grosman; Keriley Kay Romanufa; Robin D. Van Boeschoten
- Web page: https://patentgrep.com/patent/US20080306990A1

## CPC

- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Performing a redistribute of data in a database system including a plurality of nodes is disclosed. The data includes a plurality of partitions distributed between the plurality of nodes. At least one new node is being added. At least one partition of the plurality of partitions is selected to be moved from the plurality of nodes only to the at least one new node. The at least one partition is moved only to the at least one new node. At least one partition is removed from the plurality of nodes.

## Claims

### Claim 1

A computer system for performing a redistribution of data in a database system including a plurality of preexisting nodes, at least one new node being added, the computer system comprising:
a processing element for selecting, in response to the at least one new node being added to the database system, at least one partition of a plurality of partitions distributed between the plurality of preexisting nodes such that each preexisting node has one or more partitions, wherein
the partitions are substructures for the preexisting nodes and the rows of data of the database have been hashed into the partitions such that the number of partitions is greater than the number of preexisting nodes,
each of the plurality of nodes and each of the at least one new node include a portion of the data and the processing element for selecting includes a processing element for choosing the at least one partition to minimize a difference between the portion of the data in each of the plurality of preexisting nodes and each of the at least one new node,
the processing element for selecting uses a global ownership table to distinguish between the preexisting nodes and the new nodes in the database system, and
each of the at least one partition corresponds to an index;
a processing element for moving the at least one selected partition only to the at least one new node without moving one or more partitions from one of the preexisting nodes to a different one of the preexisting nodes, the processing element for moving the at least one selected partition including
a processing element for transparently accounting for the index of each of the at least one selected partition, including and element for building a new index for each of the at least one selected partition moved to the new node and a processing element for marking the index for each of the at least one selected partition as deleted on the corresponding preexisting node, such that the at least one selected partition is treated as if deleted from the corresponding preexisting node and does not need to actually be deleted immediately in response to the moving; and
a processing element for removing the at least one selected partition from the plurality of preexisting nodes.

### Claim 2 (depends on 1)

The computer system of claim 1 wherein the portion of the data for each of the plurality of preexisting nodes and each of the at least one new node corresponds to a weight and wherein the processing element for choosing further includes:
a processing element for selecting the at least one selected partition such that a weight difference that the weight for each of the plurality of preexisting nodes and each of the at least new node is minimized.

### Claim 3 (depends on 1)

The computer system of claim 1 wherein the database system includes at least one multidimensional clustering (MDC) table, the at least one MDC table determining the plurality of preexisting partitions.

### Claim 4 (depends on 1)

The computer system of claim 1 wherein the database system is a shared disk environment.

### Claim 5 (depends on 1)

The computer system of claim 1 wherein the database system is not a shared disk environment and wherein the processing element for moving further includes:
a processing element for shipping the at least one selected partition across at least one disk.

### Claim 6 (depends on 1)

The computer system of claim 1 wherein the database system includes a shared file system.

### Claim 7 (depends on 1)

The computer system of claim 1 wherein database system does not includes a shared file system and wherein the element for moving further includes:
a processing element for shipping at least one file container for the at least one selected partition.

### Claim 8 (depends on 1)

The computer system of claim 1 wherein the processing element for moving further includes:
a processing element for copying the at least one selected partition to the at least one new node;
a processing element for building the new index on each of the at least one new node for each of the at least one selected partition;
a processing element for maintaining an activity log for each of the at least one selected partition on the plurality of preexisting nodes, including a processing element for recording operations in the activity log, the operations being for the data in the at least one selected partition being copied;
a processing element for suspending access to the data, wherein the operations occurring while the new index is built are recorded in the activity log during the suspending of access to the data; and
a processing element for applying the activity log for each of the at least one selected partition on each of the at least one new node such that the operations recorded in the activity log are applied to the at least one selected partition and changes occurring while the new index was built are accounted for.

### Claim 9 (depends on 1)

The computer system of claim 1 wherein the database system includes a memory and at least one disk and wherein the element for moving further includes:
a processing element for suspending access to the at least one selected partition before moving the at least one selected partition;
a processing element for storing at least one update to the at least one selected partition in memory;
a processing element for maintaining an activity log for each of the at least one selected partition on the plurality of preexisting nodes, including a processing element for recording in the activity log operations to the data occurring during the suspending of access to the data;
a processing element for building the new index on each of the at least one new node for each of the at least one selected partition;
a processing element for applying the activity log for each of the at least one selected partition such that the operations recorded in the activity log are applied to the at least one selected partition;
a processing element for copying the at least one selected partition to the at least one new node;
a processing element for suspending access to the at least one selected partition during the copying of the at least one selected partition; and
a processing element for reapplying the activity log for each of the at least one selected partition on each of the at least one new node such that the operations recorded in the activity log are applied to the at least one partition.

### Claim 10

A computer program product comprising a computer-readable storage medium including a program implemented by a computer and performing a redistribution of data in a database system including a plurality of preexisting nodes, at least one new node being added, the program including instructions for:
in response to the at least one new node being added to the database system selecting, at least one partition of a plurality of partitions distributed between the plurality of preexisting nodes such that each preexisting node has one or more partitions, wherein
the partitions are substructures for the preexisting nodes and the rows of data of the database have been hashed into the partitions such that the number of partitions is greater than the number of preexisting nodes,
each of the plurality of nodes and each of the at least one new node include a portion of the data and the selecting includes choosing the at least one partition to minimize a difference between the portion of the data in each of the plurality of preexisting nodes and each of the at least one new node,
the selecting uses a global ownership table to distinguish between the preexisting nodes and the new nodes in the database system, and
each of the at least one partition corresponds to an index;
moving the at least one selected partition only to the at least one new node without moving one or more partitions from one of the preexisting nodes to a different one of the preexisting nodes, the moving the at least one selected partition including
transparently accounting for the index of each of the at least one selected partition, including and building a new index for each of the at least one selected partition moved to the new node and marking the index for each of the at least one selected partition as deleted on the corresponding preexisting node, such that the at least one selected partition is treated as if deleted from the corresponding preexisting node and does not need to actually be deleted immediately in response to the moving; and
removing the at least one selected partition from the plurality of preexisting nodes.

### Claim 11 (depends on 10)

The computer program product of claim 10 wherein the portion of the data for each of the plurality of preexisting nodes and each of the at least one new node corresponds to a weight and wherein the choosing further includes:
selecting the at least one selected partition such that a weight difference that the weight for each of the plurality of preexisting nodes and each of the at least new node is minimized.

### Claim 12 (depends on 10)

The computer program product of claim 10 wherein the database system includes at least one multidimensional clustering (MDC) table, the at least one MDC table determining the plurality of preexisting partitions.

### Claim 13 (depends on 10)

The computer program product of claim 10 wherein the database system is a shared disk environment.

### Claim 14 (depends on 10)

The computer program product of claim 10 wherein the database system is not a shared disk environment and wherein the moving further includes:
shipping the at least one selected partition across at least one disk.

### Claim 15 (depends on 10)

The computer program product of claim 10 wherein the database system includes a shared file system.

### Claim 16 (depends on 10)

The computer program product of claim 10 wherein database system does not includes a shared file system and wherein the moving further includes:
shipping at least one file container for the at least one selected partition.

### Claim 17 (depends on 10)

The computer program product of claim 10 wherein the moving further includes:
copying the at least one selected partition to the at least one new node;
building the new index on each of the at least one new node for each of the at least one selected partition;
maintaining an activity log for each of the at least one selected partition on the plurality of preexisting nodes, including recording operations in the activity log, the operations being for the data in the at least one selected partition being copied;
suspending access to the data, wherein the operations occurring while the new index is built are recorded in the activity log during the suspending of access to the data; and
applying the activity log for each of the at least one selected partition on each of the at least one new node such that the operations recorded in the activity log are applied to the at least one selected partition and changes occurring while the new index was built are accounted for.

### Claim 18 (depends on 10)

The computer program product of claim 10 wherein the database system includes a memory and at least one disk and wherein the moving further includes:
suspending access to the at least one selected partition before moving the at least one selected partition;
storing at least one update to the at least one selected partition in memory;
maintaining an activity log for each of the at least one selected partition on the plurality of preexisting nodes, including recording in the activity log operations to the data occurring during the suspending of access to the data;
building the new index on each of the at least one new node for each of the at least one selected partition;
applying the activity log for each of the at least one selected partition such that the operations recorded in the activity log are applied to the at least one selected partition;
copying the at least one selected partition to the at least one new node;
suspending access to the at least one selected partition during the copying of the at least one selected partition; and
reapplying the activity log for each of the at least one selected partition on each of the at least one new node such that the operations recorded in the activity log are applied to the at least one partition.

### Claim 19

A computer program product comprising a computer-readable storage medium including a program implemented by a computer and performing a redistribution of data in a database system including a plurality of preexisting nodes, at least one new node being added, the program including instructions for:
in response to the at least one new node being added to the database system, selecting at least one partition of a plurality of partitions distributed between the plurality of preexisting nodes such that each preexisting node has one or more partitions, wherein the partitions are substructures for the preexisting nodes and the rows of data of the database have been hashed into the partitions such that the number of partitions is greater than the number of preexisting nodes, wherein
each of the plurality of nodes and each of the at least one new node include a portion of the data and the selection includes choosing the at least one partition to minimize a difference between the portion of the data in each of the plurality of preexisting nodes and each of the at least one new node, wherein
the selection is performed using a global ownership table to distinguish between the preexisting nodes and the new nodes in the database system, and wherein
each of the at least one partition corresponds to an index;
moving the at least one selected partition only to the at least one new node without moving one or more partitions from one of the preexisting nodes to a different one of the preexisting nodes, the moving the at least one selected partition including
copying the at least one selected partition to the at least one new node;
building a new index on each of the at least one new node for each of the at least one selected partition;
maintaining an activity log for each of the at least one selected partition on the plurality of preexisting nodes, including recording operations in the activity log, the operations being for the data in the at least one selected partition being copied;
suspending access to the data, wherein the operations occurring while the new index is built are recorded in the activity log during the suspending of access to the data; and
applying the activity log for each of the at least one selected partition on each of the at least one new node such that the operations recorded in the activity log are applied to the at least one selected partition and changes occurring while the new index was built are accounted for; and
marking the index for each of the at least one partition as deleted; and
removing the at least one selected partition from the plurality of preexisting nodes.
