INFORMATION PROCESSOR, DISTRIBUTED DATABASE SYSTEM, AND BACKUP METHOD

According to one embodiment, a apparatus includes a first module which stores update information includes position information indicating an update position in the data file in a first storage and data to be updated in a second storage, such that update information items includes the update information are stored in contiguous storage areas of the second storage in the order of request of each of the update information items when the data file is requested to be updated, and a second module which stores the update information items stored in the second storage in free space having contiguous addresses of a third storage, in the order of storing in the second storage, if an amount of the update information items in the second storage exceeds a set volume.

DETAILED DESCRIPTION

In general, according to one embodiment, an information processing apparatus includes a first storage device, a second storage device, a first storing module, a third storage device, and a second storing module. The first storage device is configured to store a data file. The first storing module is configured to store update information item comprising position information indicating an update position in the data file and data to be updated in the second storage device, such that update information items comprising the update information item are stored in contiguous storage areas of the second storage device in the order of request of each of the update information items when the data file is requested to be updated. The second storing module is configured to store the update information items stored in the second storage device in free space having contiguous addresses of the third storage device, in the order of storing in the second storage device, if an amount of the update information items in the second storage device exceeds a set volume.

FIG. 1shows a construction example of a distributed database system100in which an information processor of the present embodiment is applied as a node10. As shown inFIG. 1, the distributed database system100is structured by a plurality of nodes10connected to data communication path A. Further, in structuring the distributed database system100, there are various ways of structuring, such as (a) adopting one of the plurality of nodes10as a master, and have the selected node10manage control of the entire distributed database system100, (b) making the plurality of nodes10operate independently as members of the distributed database system100on the same footing in accordance with predetermined rules, and (c) providing a host node which manages control of the entire distributed database system100separately from the plurality of nodes10. However, a mechanism of data backup to be described later is not limited to any of the above methods.

Now, it is assumed that a request is made to the distributed database system100from a host machine1to read data. In case (a), the request from the host machine1is accepted by the node10serving as the master, and the node10having the data is determined. If the master node10does not store the data, the request is transmitted to the data holding node10. In case (b), each of the nodes10accepts the request from the host machine1, and judges whether the data in question is stored in their own nodes. One of the nodes10which judges that the data is stored in its own node executes the reading processing. Further, in case (c), the request from the host machine1is accepted by the host node, and a judgment is made as to which node10has the data and the request is transmitted to the data holding node10.

Further, as shown inFIG. 2, the node10comprises a communication and I/O controller11, a cache storage device12, a normal storage device13, and a backup storage device14. The communication and I/O controller11is a device which manages control of the node10, and primarily has the function of executing communication with the other node10. Further, the node10comprises a central processing unit (CPU) for executing a database management system application program20. The database management system application program20is a program for managing a distributed database.

The database management system application program20updates a distributed database file based on a request from the host machine1received by the communication and I/O controller11. Further, the database management system application program20reads data from the distributed database file based on the request from the host machine1received by the communication and I/O controller11, and transmits the data which has been read.

Three hierarchical levels are structured by the cache storage device12, the normal storage device13, and the backup storage device14. A random access speed of the cache storage device12is the highest of the three types of the storage devices. A random access speed of the normal storage device13is lower than that of the cache storage device12. The backup storage device14may not have a random-access capability, and even if it has the random-access capability, a random access speed is lower than that of the normal storage device13. A sequential access speed of the normal storage device13or the backup storage device15is substantially the same as that of the cache storage device12or higher than that of the cache storage device12. Even if the sequential access speed is low, it is not as low as the random access capability.

The normal storage device13stores the distributed database file and partitioning information. The entire database file is divided as partitions. The distributed database file constitutes the database file divided as partitions. The distributed database file is a part of the database file. The partitioning information includes information indicating the node in which each of the divided partitions (each distributed database file) is stored.

Each node10includes status information of the entire distributed database system100and the partitioning information, and these kinds of information are synchronized in the distributed database system100by a communication function of the communication and I/O controller11. The partitioning information is the information showing which node10includes each partition prepared by dividing the storage area of the entire distributed database system100.

Further, in the partitioning information, an index, which enhances efficiency of random reference processing or access to a record in a constant order, may be created for one or more columns in the distributed database file (table). The index has a data structure for speeding up processing to the distributed database file.

Also, statistical information summarizing the distributed database file and a property of the index (data size, distribution of data, etc.) may be included in the partitioning information. The statistical information includes statistics on the table, such as the size of the table, the number of rows, and an average size per row. Further, the statistical information includes statistics on the columns in the table, such as the number of types of column data, and a data distribution (histogram). Furthermore, the statistical information includes statistics on the index, such as the size of the index, the number of hierarchical levels, and a clustering coefficient. The statistical information also includes statistics on the system (node), such as an input/output (I/O) of a server and throughput of the CPU.

The communication and I/O controller11secondarily has the function of controlling data input-output for the cache storage device12, the normal storage device13, and the backup storage device14.

More specifically, the communication and I/O controller11executes reading of data from the cache storage device12, the normal storage device13, and the backup storage device14, and writing of data in the same based on a request from the database management system application program20.

FIG. 3is a block diagram showing a configuration of the database management system application program20.

The database management system application program20comprises a data area update module21, a partitioning information update module22, a backup module23, a restoration point insertion module24, etc.

FIG. 4is a schematic diagram for describing processing by the database management system application program20.

The data area update module21is configured to update a distributed database file101in the normal storage device13in response to an update request from the host machine1. The data area update module21is configured to store the update request in the cache storage device12as update information102. Update information is written in the cache storage device if there was access to the node to request an update of data in the distributed database file of that node. Data update information comprises position information indicating an update position in the distributed data file and data to be updated.

The data area update module21is configured to store the update information102in free space having contiguous addresses of the cache storage device12. Preferably, the data area update module21should write information in contiguous storage areas in an ascending order of address numbers of an area in which no data is stored in the cache storage device12. By writing the update information in the contiguous storage areas in the ascending order of address numbers of the area in which no data is stored in the cache storage device12, a plurality of items of the update information are contiguously stored in the order of access in the cache storage device.

The partitioning information update module22is configured to update partitioning information103regularly according to the distributed database file.

If an amount of a plurality of items of update information112in the cache storage device12or the number of items of update information becomes greater than a set value, the backup module23copies the plurality of items of update information112in the cache storage device12to the backup storage device14(reference numeral122ofFIG. 4). The backup module23reads the update information from the storage areas storing the plurality of items of update information112in the cache storage device12in a sequential order from the initial address, and copies the read update information to the backup storage device14. Since the update information is stored in the order of access, even if the backup module23does not know the order of access, access is allowed in the order of access of the update information.

In copying, the backup module23copies the update information in free space having contiguous addresses of the backup storage device14. Preferably, the backup module23should write update information in contiguous storage areas in an ascending order of address numbers of an area in which no data is stored in the backup storage device14. By writing the update information in the contiguous storage areas in the ascending order of address numbers of the area in which no data is stored in the backup storage device14, a plurality of items of update information are contiguously stored in the backup storage device14.

After copying, the backup module23is configured to erase the update information112in a high-speed cache area. In erasing, the backup module23generates a backup file113of the partitioning information by copying the partitioning information103in the backup storage device14.

Further, a plurality of partitions may be set in the backup storage device14so that a partition in which the partitioning information113is stored and a partition in which a plurality of items of update information122are stored can be separated. Furthermore, a different backup storage device for the partitioning information113may be prepared to have the partitioning information113stored in the different backup storage device.

FIG. 5is a schematic diagram for describing processing by the database management system application program20.

Further, in order to designate a restoration point, restoration point information is transmitted to each node from the host machine1, the master node, or the host node, for example, regularly or by an administrator's instruction.

In receiving the restoration point information, the restoration point insertion module24of each node is configured to write restoration point information104in free space having contiguous addresses in the cache storage device12. Preferably, the restoration point information104should be written in contiguous storage areas in an ascending order of address numbers of an area in which no data is stored in the backup storage device14.

In copying the update information in the cache storage device12to the backup storage device14, the backup module23also copies the restoration point information. The backup module23is configured to copy the restoration point information in free space having contiguous addresses of the backup storage device14. The backup module23reads the update information from the storage areas where the plurality of items of update information112and the restoration point information104are stored in the cache storage device12in a sequential order from the initial address, and copies the same to the backup storage device14. Since the update information112and the restoration point information104are stored in the order of access, even if the backup module23does not know the order of access, the update information112and the restoration point information104can be accessed in the order of access.

Preferably, the backup module23should write the update information and the restoration point information in contiguous storage areas in an ascending order of address numbers of an area in which no data is stored in the backup storage device14. By writing the restoration point information in the contiguous storage areas in the ascending order of address numbers of the area in which no data is stored in the backup storage device14, a plurality of items of the update information and the restoration point information are contiguously stored in the backup storage device14.

In the above procedure, a backup is obtained by reading the update information from the storage areas where the update information112and the restoration point information104are stored of the cache storage device12in a sequential order from the initial address, and copying the same to the backup storage device14. By doing so, it becomes possible to obtain a differential backup efficiently while maintaining a high-speed feature of the hierarchical storage devices.

Further, since the data stored in the cache storage device is not changed by the backup, it becomes possible to carry out a backup method which does not affect the performance of the distributed database system100.

The steps of restoring the distributed database file based on the backup data stored in the backup storage device14are reproduced by successively applying the update information stored in the contiguous areas of the backup storage device14to the designated restoration point.

Instead of storing all items of the update information, only the memory location in the normal storage device13may be stored in the cache storage device12so that the relevant data is copied to the backup storage device14from the normal storage device13based on the memory location instead of copying all items of the update information to the backup storage device14. By doing so, a differential backup in which the capacity of the cache storage device12is saved is enabled.

Since all of the steps of storing data in accordance with an update request for data and the steps of data backup of the present embodiment can be realized by software, by installing this software into an ordinary computer through a computer-readable storage medium, an advantage similar to the advantage obtained by the present embodiment can be easily realized.