Mechanism to resubmit queries in a parallel database system
First Claim
1. An apparatus for resubmitting queries responsive to recovery actions of a high availability function, said apparatus comprising:
- a work queue;
a database subsystem;
a first server submitting queries from said work queue to said database subsystem;
a module responsive to the high availability function, said module including a first function interrogating said work queue to determine if the work queue contains uncompleted queries at the start of said recovery actions;
a first check in said module determining if reconfiguration of the database subsystem has been completed responsive to said recovery actions; and
a second function in said module which, responsive to the completion of said reconfiguration as determined by said first check, modifies the number of job priorities of the uncompleted queries if the database subsystem is operating in a degraded state due to said reconfiguration.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus, method and program product for resubmitting queries encompassed by a Query Management Subsystem (QMS) responsive to high availability recovery actions within itself and a database subsystem it is designed to serve. The invention includes a work queue, a database subsystem, and a first QMS server which invokes and tracks queries in the work queue (received through traditional client interface means) as delivered to the database subsystem. A Query Resubmittal Mechanism (QRM) in the QMS is responsive to the database, client, and high availability recovery actions for both the QMS and database subsystem. The QRM modifies the status of queries in the work queue depending on whether a query has been submitted to the database or a database query response has been received. Incoming client queries are placed in the work queue (with queued status Q). Completed queries from the database are removed from the work queue and answer sets returned to the originating client. The QRM modifies the status of the oldest queries in the work queue from queued (Q) to active (A) and submits them to the database if the number of queries marked as active (A) in the work queue are under a user-defined, adjustable limit. The QRM determines if reconfiguration of the database subsystem has been completed in response to high availability recovery actions. QRM then modifies the adjustable limit and/or job priorities of the uncompleted queries if the database subsystem is operating in a degraded state (or returning to a repaired state) due to said reconfiguration. The work queue becomes durable by making it accessible to a backup, second server, and implementing a high availability configuration to restart the QMS/QRM on the backup server. When the QMS/QRM is started (after an operator shutdown) or restarted on the backup server (in the high-availability configuration), the QRM interrogates the work queue to determine if it contains uncompleted queries and resubmits them, up to the adjustable limit.
-
Citations
20 Claims
-
1. An apparatus for resubmitting queries responsive to recovery actions of a high availability function, said apparatus comprising:
-
a work queue;
a database subsystem;
a first server submitting queries from said work queue to said database subsystem;
a module responsive to the high availability function, said module including a first function interrogating said work queue to determine if the work queue contains uncompleted queries at the start of said recovery actions;
a first check in said module determining if reconfiguration of the database subsystem has been completed responsive to said recovery actions; and
a second function in said module which, responsive to the completion of said reconfiguration as determined by said first check, modifies the number of job priorities of the uncompleted queries if the database subsystem is operating in a degraded state due to said reconfiguration. - View Dependent Claims (2, 3, 4, 5, 6, 7)
a second check in said module determining if an uncompleted query had been submitted to said database subsystem at the start of the recovery actions; and
a third function adding said uncompleted query determined by said second check to said work queue with a queued (Q) status.
-
-
3. The apparatus of claim 2 further comprising:
-
a third check in said module determining when any query submitted from said server to said database has been finished by said database;
a fourth check in said module determining whether the query determined by said third check to have been finished by said database contains Return Codes (RC) which are OK or not OK.
-
-
4. The apparatus of claim 3 further comprising:
a fourth function in said module which, when said fourth check determines that the RC is not OK, retains the query determined by said third check in said work queue, and modifies the status of that retained query from an Active (A) status to the Q status.
-
5. The apparatus of claim 3 further comprising:
a fifth function in said module which, when said fourth check determines that the RC is OK, removes the query determined by said third check from said work queue.
-
6. The apparatus of claim 5 further comprising:
-
a fifth check in said module determining when the query of each of said second, third, and fifth functions exceed a predetermined limit of active queries allowed in said work queue; and
a sixth function in said module which, when said predetermined limit of said fifth check is not exceeded, selects from the work queue, the oldest query in said work queue having a Q status, and modifying its status to A.
-
-
7. The apparatus of claim 1 further comprising:
a second server for being used by the high availability function in the recovery actions to replace said first server if said first server fails, said work queue being accessible by both of said first server and said second server, thereby making said work queue durable in the event said first server is replaced by said second server.
-
8. A method for resubmitting queries to recovery actions of a high availability function, said method comprising the steps of:
-
a) providing a work queue;
b) providing a database subsystem;
c) submitting from a first server, queries from said work queue to said database subsystem;
d) responsive to said recovery actions, interrogating said work queue to determine if the work queue contains uncompleted queries at the start of said recovery actions;
e) determining if reconfiguration of the database subsystem has been completed responsive to said recovery actions; and
f) responsive to the completion of said reconfiguration as determined by step e), modifying the number and/or job priorities of the uncompleted queries if the database subsystem is operating in a degraded state due to said reconfiguration. - View Dependent Claims (9, 10, 11, 12, 13, 14)
g) determining if an uncompleted query had been submitted to said database subsystem at the start of the recovery actions; and
h) adding said uncompleted query determined by step g) to said work queue with a queued (Q) status.
-
-
10. The method of claim 9 further comprising:
-
i) determining when any query submitted from said server to said database has been finished by said database;
j) determining whether the query determined by step i) to have been finished by said database contains Return Codes (RC) which are OK or not OK.
-
-
11. The method of claim 10 further comprising:
k) when step j) determines that the RC is not OK, retaining the query determined by step i) in said work queue, and modifying the status of that retained query from an Active (A) status to the Q status.
-
12. The method of claim 11 further comprising:
l) when step k) determines that the RC is OK, remove the query determined by i) from said work queue.
-
13. The method of claim 12 further comprising:
-
m) determining if the query of each of steps f), h), and l) exceed a predetermined limit of active queries allowed in said work queue;
n) when said predetermined limit of step m) is not exceeded, select from the work queue the oldest query in said work queue having a Q status, and modifying its status to A.
-
-
14. The method of claim 8 further comprising:
-
providing a second server for being used by the high availability function in the recovery actions to replace said first server if said first server fails; and
making said work queue being inaccessible by both of said first server and said second server, thereby making said work queue durable in the event said first server is replaced by said second server.
-
-
15. A computer program product comprising a computer useable medium having computer readable program code means therein for use in resubmitting queries in a work queue from a query management subsystem residing on a first server to a database responsive to recovery actions of a high availability function, said computer readable program code means in said computer program product comprising:
-
computer readable program code means for submitting queries by said first server from said work queue to said database subsystem;
computer readable program code means for interrogating said work queue to determine when the work queue contains uncompleted queries at the start of said recovery actions;
computer readable program code means for determining from a first check when reconfiguration of the database subsystem has been completed responsive to said recovery actions; and
computer readable program code means in a first function for, responsive to the completion of said reconfiguration as determined said first check, modifying the number or job priorities of the uncompleted queries if the database subsystem is operating in a degraded state due to said reconfiguration. - View Dependent Claims (16, 17, 18, 19, 20)
computer readable program code means for determining in a second check if an uncompleted query had been submitted to said database subsystem at the start of the recovery actions; and
computer readable program code means in a second function for adding said uncompleted query determined by said second check to said work queue with a queued (Q) status.
-
-
17. The computer readable program code means in said computer program product of claim 16 further comprising:
-
computer readable program code means for determining in a third check when any query submitted from said server to said database has been finished by said database;
computer readable program code means for determining in a fourth check whether the query determined by said third check to have been finished by said database contains Return codes (RC) which are OK or not OK.
-
-
18. The computer readable program code means in said computer program product of claim 17 further comprising:
computer readable program code means for, when said fourth check determines that the RC is not OK, retaining the query determined by said third check in said work queue, and modifying that retained query status from an Active (A) status to the Q status.
-
19. The computer readable program code means is said computer program product of claim 18 further comprising:
computer readable program code means in a third function for, when said fourth check determines that the RC is OK, removing the query determined by said third check from said work queue.
-
20. The computer readable program code means in said program product of claim 19 further comprising:
-
computer readable program code means for determining in a fourth check, if the query of each of said first, second and third functions exceed a predetermined limit of active queries allowed in said work queue; and
computer readable program code means for when said predetermined limit of said fourth check is not exceeded, selecting from the work queue, the oldest query in said work queue having a Q status, and modifying its status to A.
-
Specification