Non-blocking drain method and apparatus used to reorganize data in a database
First Claim
1. A method for use in reorganizing a resource including data, the method comprising:
- in response to a reorganization request, using a non-blocking drain to lock on the resource;
delaying processing of the reorganization request until the completion of processing of one or more requests on the resource made prior to the reorganization request;
processing one or more requests on the resource made during the delay in processing of the reorganization request;
after the delay in processing the reorganization request, processing the reorganization request by;
unloading a copy of the data from the resource;
reorganizing said copied data;
loading said reorganized data into a shadow location;
applying log records to said shadow location data, said log records adjusting said reorganized data for changes occurring to the resource after said data was unloaded; and
replacing said data in the resource with said reorganized data.
4 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for online reorganization of a database which does not prevent a process from accessing the database during the data reorganization. The invention uses a non-blocking drain to lock on a database, unloads a copy of the data contained in the database, reorganizes the copied data, loads the reorganized data into a shadow location, applies log records to the shadow location data so that the reorganized data may be adjusted for any changes to the database after the data was copied and reorganized, and then replaces the data in the database with the reorganized data. The non-blocking drain does not prevent other requests on the database from being processed while the reorganization lock is in place, except briefly when the reorganized data replaces the data in the database.
-
Citations
20 Claims
-
1. A method for use in reorganizing a resource including data, the method comprising:
-
in response to a reorganization request, using a non-blocking drain to lock on the resource; delaying processing of the reorganization request until the completion of processing of one or more requests on the resource made prior to the reorganization request; processing one or more requests on the resource made during the delay in processing of the reorganization request; after the delay in processing the reorganization request, processing the reorganization request by; unloading a copy of the data from the resource; reorganizing said copied data; loading said reorganized data into a shadow location; applying log records to said shadow location data, said log records adjusting said reorganized data for changes occurring to the resource after said data was unloaded; and replacing said data in the resource with said reorganized data. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A signal-bearing medium tangibly embodying a program of machine-readable instructions executable by a digital processing apparatus to perform a method for reorganizing a resource including data, said method comprising:
-
in response to a reorganization request, using a non-blocking drain to lock on the resource; delaying processing of the reorganization request until the completion of processing of one or more requests on the resource made prior to the reorganization request; processing one or more requests on the resource made during the delay in processing of the reorganization request; after the delay in processing the reorganization request, processing the reorganization request by; unloading a copy of the data from the resource; reorganizing said copied data; loading said reorganized data into a shadow location; applying log records to said shadow location data, said log records adjusting said reorganized data for changes occurring to the resource after said data was unloaded; replacing said data in the resource with said reorganized data; and wherein changes due to the processing of the requests made prior to the reorganization request and during the delay in processing the reorganization request are included in the processing of the reorganization request. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A digital processing machine used to reorganize a database, the device comprising:
-
a database; a digital processing apparatus communicatively coupled to said database, the digital processing apparatus configured to receive data from said database, and further configured to receive data and commands from a signal-bearing medium tangibly embodying a program of machine-readable instructions executable by the digital processing apparatus and used to reorganize said database by; in response to a reorganization request, using a non-blocking drain to lock on the resource; delaying processing of the reorganization request until the completion of processing of one or more requests on the resource made prior to the reorganization request; processing one or more requests on the resource made during the delay in processing of the reorganization request; after the delay in processing the reorganization request, processing the reorganization request by; unloading a copy of the data from the resource; reorganizing said copied data; loading said reorganized data into a shadow location; applying log records to said shadow location data, said log records adjusting said reorganized data for changes occurring to the resource after said data was unloaded; replacing said data in the resource with said reorganized data; and wherein changes due to the processing of the requests made prior to the reorganization request and during the delay in processing the reorganization request are included in the processing of the reorganization request. - View Dependent Claims (12, 13, 14, 15)
-
-
16. An apparatus for reorganizing a database, the apparatus comprising:
-
a digital processing apparatus configured to receive data from a database, and further configured to receive data and commands from a signal-bearing medium tangibly embodying a program of machine-readable instructions executable by the digital processing apparatus and used to reorganize said database; means for storing said database; non-blocking drain means for accessing and locking said database in response to a reorganization request; means for delaying processing of the reorganization request until the completion of processing of one or more requests on the resource made prior to the reorganization request; means for processing one or more requests on the resource made during the delay in processing of the reorganization request; means for processing the reorganization request after the delay in processing, including; copying means for copying data from said database; means for reorganizing said copied data; means for loading said reorganized data into a shadow location; log means for applying log records to said shadow location data, said log records adjusting said reorganized data for changes occurring to said database after said data was unloaded; and means for replacing said data in said database with said reorganized data. - View Dependent Claims (17, 18, 19, 20)
-
Specification