P
US7587400B2ExpiredUtilityPatentIndex 62

Suspending a result set and continuing from a suspended result set for transparent session migration

Assignee: ORACLE INT CORPPriority: Aug 12, 2004Filed: Apr 1, 2005Granted: Sep 8, 2009
Est. expiryAug 12, 2024(expired)· nominal 20-yr term from priority
Inventors:BASTAWALA MEHUL DCHIDAMBARAN LAKSHMINARAYANANGOLLAPUDI SREENIVASKALUSKAR SANJAYKRISHNASWAMY SRINATHCHATTERJEE DEBASHISH
G06F 16/284Y10S707/99953
62
PatentIndex Score
6
Cited by
60
References
38
Claims

Abstract

A system, method, computer program and system for suspending a result set and continuing from a suspended result set for transparent session migration is disclosed. The rows from a row source are suspended into storage, so that after session migration, the client fetches can transparently continue from the suspended result set.

Claims

exact text as granted — not AI-modified
1. A computer-implemented method for suspending a cursor result set for transparently migrating a first session, the method comprising:
 receiving notification the first session at a first server is selected for migration; 
 preparing to migrate, preparing including suspending a cursor result set for the first session; 
 suspending the cursor result set by storing the cursor result set in a storage area of a computer-usable medium for later access without re-execution of a query; 
 determining if the first session is ready to migrate; and 
 migrating the first session at the first server to a second server, the migrating comprising:
 opening a second session on the second server; 
 copying session state of the first session into the second session; and 
 creating a connection to the second session on the second server, wherein the connection to the second session on the second server allows for continued execution of the query from the suspended cursor result set without re-execution of the query. 
 
 
   
   
     2. The method of  claim 1  wherein migrating comprises:
 opening the second session; 
 copying the suspended cursor result set to the second session; 
 connecting a client to the second session; and 
 breaking the client connection to the first session. 
 
   
   
     3. The method of  claim 2 , further comprising executing a fetch request on the suspended cursor result set from the second session. 
   
   
     4. The method of  claim 3 , wherein executing the fetch request on the suspended cursor result set comprises:
 determining a location of a subject row of the cursor result set; and 
 returning the subject row from the location. 
 
   
   
     5. The method of  claim 2 , wherein executing a call on the suspended result set via the second session is preceded by the same cursor executing a call on the result set via the first session. 
   
   
     6. The method of  claim 5 , wherein the storage area comprises memory, persistent storage, or a combination of persistent storage and memory. 
   
   
     7. The method of  claim 5 , wherein the storage area includes all the rows in cursor result set. 
   
   
     8. The method of  claim 2 , wherein the client is unaware that a session is migrating or of a switch from the first session to the second session. 
   
   
     9. The method of  claim 1 , wherein suspending cursor result sets comprises storing the rows of each cursor, each cursor's rows stored into the storage area associated with a corresponding cursor. 
   
   
     10. The method of  claim 1  in which a client accesses session data from the first session before migration has completed. 
   
   
     11. The method of  claim 1  in which a client accesses session data from the first session after migration has completed. 
   
   
     12. A computer-implemented method for suspending a cursor result set and continuing a suspended cursor result set for transparent session migration, the method comprising:
 executing a query on a first session on a first server; 
 receiving notification the first session was selected for migration; 
 preparing to migrate the first session; 
 suspending a cursor result set by storing the cursor result set in a computer-usable storage medium for later access without re-execution of a query; 
 determining if ready to migrate the first session; and 
 migrating the first session at the first server to a second server and accessing the cursor result set from the suspended cursor result set, the migrating comprising:
 opening a second session on the second server; 
 copying session state of the first session into the second session; and 
 creating a connection to the second session on the second server, wherein the connection to the second session on the second server allows for continued execution of the query from the suspended cursor result set without re-execution of the query. 
 
 
   
   
     13. The method of  claim 12 , wherein preparing to migrate comprises:
 determining the cursor result set is being fetched; 
 computing a set of constraint values for a cursor; and 
 suspending the result set of the cursor. 
 
   
   
     14. The method of  claim 13 , wherein preparing to migrate further comprising sending notification to the client of the selection for migration. 
   
   
     15. The method of  claim 13 , the suspending further comprising:
 a) caching a row into a storage location; 
 b) determining if any of the set of constraint values have been exceeded; 
 c) determining if there are more rows to be suspended if the constraint values have not been exceeded; and 
 d) repeating a)-c) if there are more rows to be suspended. 
 
   
   
     16. The method of  claim 12 , wherein migrating comprises:
 opening the second session on a second server; 
 copying the first session's state information to the second session; 
 connecting a client to the second session; and 
 breaking connection between the client and the first session. 
 
   
   
     17. The method of  claim 16 , further comprising executing a call on the suspended result set data via a second session. 
   
   
     18. The method of  claim 17 , wherein the continuing the suspended cursor result set further comprises:
 e) determining that the result set is suspended; 
 f) determining the location of a subject row of the result set; 
 g) repeating e)-g) until all the required rows have been fetched. 
 
   
   
     19. The method of  claim 17 , wherein executing a call on the suspended result set via a second session is preceded by a cursor executing a call on the result set via the first session. 
   
   
     20. The method of  claim 16 , wherein suspending a result set comprises:
 determining the cursor result set is to be suspended; 
 storing a first row of the cursor result set in a storage area; and 
 repeating the storing until all the required rows have been suspended. 
 
   
   
     21. The method of  claim 20 , wherein the suspending is performed in a manner so that the performance degradation of the returning rows to the client caused by the suspending is unnoticeable to a user. 
   
   
     22. The method of  claim 12 , wherein a user is unaware of switching from the first session to the second session. 
   
   
     23. The method of  claim 12 , wherein the suspended result set is transmitted from one node to another node. 
   
   
     24. The method of  claim 12 , wherein the executing query is a distributed sequential query language (SQL) query. 
   
   
     25. The method of  claim 12  wherein the query does not have to adjust any application parameters due to the migration. 
   
   
     26. The method of  claim 12 , wherein the transparent session migration is a cascaded transparent session migration. 
   
   
     27. A computer program product comprising a computer usable storage medium having executable code to execute a process for suspending a cursor result set and continuing a suspended cursor result set for transparent session migration, the process comprising:
 executing a query on a first session on a first server; 
 receiving notification the session was selected for migration; 
 preparing to migrate, preparing including suspending a cursor result set for the first session; 
 suspending the cursor result set by storing the cursor result set for later access without re-execution of a query; 
 determining if ready to migrate the first session; and 
 migrating the first session at the first server to a second server, when ready and accessing the cursor result set from the suspended cursor result set, the migrating comprising:
 opening a second session on the second server; 
 copying session state of the first session into the second session; and 
 creating a connection to the second session on the second server, wherein the connection to the second session on the second server allows for continued execution of the query from the suspended cursor result set without re-execution of the query. 
 
 
   
   
     28. The computer program product of  27 , the process further comprising: executing a fetch request on the suspended cursor result sets from the second session. 
   
   
     29. The computer program product of  27 , wherein a client is unaware that a session is migrating or of a switch from the first session to the second session. 
   
   
     30. A system comprising a computer usable storage medium for suspending a cursor result set and continuing a suspended cursor result set for transparent session migration, comprising:
 means for executing a query on a first session on a first server; 
 means for receiving notification the first session was selected for migration; 
 means for preparing to migrate the first session; 
 means for suspending a cursor result set by storing in the computer usable storage medium the cursor result set for later access without re-execution of a query; 
 means for determining if ready to migrate the first session; and 
 means for migrating the first session at the first server to a second server and accessing the cursor result set from the suspended cursor result set, the migrating comprising:
 opening a second session on the second server; 
 copying session state of the first session into the second session; and 
 creating a connection to the second session on the second server, wherein the connection to the second session on the second server allows for continued execution of the query from the suspended cursor result set without re-execution of the query. 
 
 
   
   
     31. The system of  claim 30 , further comprising:
 means for executing a fetch request on the suspended cursor result sets from a second session. 
 
   
   
     32. The system of  claim 30 , wherein a client is unaware that a session is migrating or of a switch from the first session to the second session. 
   
   
     33. A computer program product comprising a computer usable storage medium having executable code to execute a process for suspending a cursor result set for transparently migrating a first session, the process comprising:
 executing a query on a first session on a first server; 
 receiving notification the first session was selected for migration; 
 preparing to migrate the first session; 
 suspending a cursor result set by storing the cursor result set for later access without re-execution of a query; 
 determining if ready to migrate the first session; and 
 migrating the first session at the first server to a second server, the migrating comprising:
 opening a second session on the second server; 
 copying session state of the first session into the second session; and 
 creating a connection to the second session on the second server, wherein the connection to the second session on the second server allows for continued execution of the query from the suspended cursor result set without re-execution of the query. 
 
 
   
   
     34. The computer program product of  33 , the process further comprising: executing a fetch request on a suspended cursor result sets from the second session. 
   
   
     35. The computer program product of  33 , wherein a client is unaware that a session is migrating or of a switch from the first session to the second session. 
   
   
     36. A system comprising a computer usable storage medium for suspending a cursor result set for transparently migrating a first session, the method comprising:
 means for executing a query on a first session on a first server; 
 means for receiving notification the first session is selected for migration; 
 means for preparing to migrate, preparing including suspending a cursor result set for the first session; 
 means for suspending the cursor result set by storing in the computer usable storage medium the cursor result set for later access without re-execution of a query; 
 means for determining if the first session is ready to migrate; and 
 means for migrating the first session at the first server to a second server, the migrating
 comprising: 
 opening a second session on the second server; 
 copying session state of the first session into the second session; and 
 creating a connection to the second session on the second server, wherein the connection to the second session on the second server allows for continued execution of the query from the suspended cursor result set without re-execution of the query. 
 
 
   
   
     37. The system of  claim 36 , further comprising:
 means for executing a fetch request on a suspended cursor result sets from the second session. 
 
   
   
     38. The system of  claim 36 , wherein a client is unaware that a session is migrating or of a switch from the first session to the second session.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.