IP Library Granted Patent US 9,519,589
Granted Patent B2
US 9,519,589 · App. 13/205,443 · Granted Dec 13, 2016

Methods to perform disk writes in a distributed shared disk system needing consistency across failures

Inventors: Sashikanth Chandrasekaran (Bellmont, CA); Roger J. Bamford (Woodside, CA); William H. Bridge (Alameda, CA); David Brower (Alamo, CA); Neil MacNaughton (Los Gatos, CA); Wilson Wai Shun Chan (San Mateo, CA); Vinay Srihari (San Francisco, CA)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F12/0866G06F12/0804G06F12/0815G06F11/1469G06F11/1471Y10S707/99952Y10S707/99953Y10S707/99954
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,519,589
App. No.
13/205,443
Granted
Dec 13, 2016
Kind
B2
Abstract

Techniques are provided for managing caches in a system with multiple caches that may contain different copies of the same data item. Specifically, techniques are provided for coordinating the write-to-disk operations performed on such data items to ensure that older versions of the data item are not written over newer versions, and to reduce the amount of processing required to recover after a failure. Various approaches are provided in which a master is used to coordinate with the multiple caches to cause a data item to be written to persistent storage. Techniques are also provided for transferring data items and locks associated with the data items from one node to another.

Claims (42)

1. A method performed by a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, comprising:

writing a data item in a cache associated with the first node to the shared persistent storage; and

while the writing of the data item is in progress and before the writing of the data item completes:

initiating a transfer operation to transfer the data item and a lock associated with the data item from the first node to a second node, wherein the lock allows the second node to modify the data item; and

sending a communication to a master of the data item to inform the master that writing of the data item to the shared persistent storage is in progress, wherein the one or more masters comprises the master.

2. The method of claim 1 , wherein the lock has an associated role of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with the master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, and wherein the lock is transferred to the second node with a role of global.

3. The method of claim 2 , wherein prior to the transfer operation, the lock has a role of local, and wherein initiating the transfer operation comprises changing the role associated with the lock from local to global.

4. The method of claim 3 , wherein the method further comprises:

after writing of the data item is completed, sending a write confirmation to the master of the data item to cause the master of the data item to send a message to the second node informing the second node that the role associated with the lock can be changed from global to local.

5. A non-transitory computer-readable storage medium carrying instructions, which when executed by one or more processors of a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, cause:

writing a data item in a cache associated with the first node to the shared persistent storage; and

while the writing of the data item is in progress and before the writing of the data item completes:

initiating a transfer operation to transfer the data item and a lock associated with the data item from the first node to a second node, wherein the lock allows the second node to modify the data item; and

sending a communication to a master of the data item to inform the master that writing of the data item to the shared persistent storage is in progress, wherein the one or more masters comprises the master.

6. The non-transitory computer-readable storage medium of claim 5 , wherein the lock has an associated role of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with the master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, and wherein the lock is transferred to the second node with a role of global.

7. The non-transitory computer-readable storage medium of claim 6 , wherein prior to the transfer operation, the lock has a role of local, and wherein initiating the transfer operation comprises changing the role associated with the lock from local to global.

8. The non-transitory computer-readable storage medium of claim 7 , wherein the instructions comprise instructions, that when executed by the one or more processors, cause:

after writing of the data item is completed, sending a write confirmation to the master of the data item to cause the master of the data item to send a message to the second node informing the second node that the role associated with the lock can be changed from global to local.

9. A method performed by a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, comprising:

transferring a data item and a lock associated with the data item from the first node to a second node, wherein the lock has a current role associated therewith of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with a master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, wherein the one or more masters comprises the master, and wherein transferring comprises:

determining whether the data item has been dirtied by the first node;

in response to determining that the data item has been dirtied by the first node, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock; and

in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is local, transferring the data item and the lock associated with the data item to the second node with a role of local assigned to the lock.

10. The method of claim 9 , wherein the lock allows the second node to modify the data item.

11. The method of claim 10 , wherein the lock is an exclusive lock.

12. The method of claim 9 , wherein the data item has been dirtied by another node but not by the first node, and wherein the first node does not link the data item to a dirty queue of the first node.

13. The method of claim 9 , wherein the data item has been dirtied by the first node, and wherein the method further comprises:

retaining a copy of the data item, which is linked to a dirty queue of the first node, even after the data item has been transferred to the second node.

14. The method of claim 9 , wherein transferring further comprises:

in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is global, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock.

15. A non-transitory computer-readable storage medium carrying instructions, which when executed by one or more processors of a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, cause the one or more processors to perform:

transferring a data item and a lock associated with the data item from the first node to a second node, wherein the lock has a current role associated therewith of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with a master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, and wherein transferring comprises:

determining whether the data item has been dirtied by the first node;

in response to determining that the data item has been dirtied by the first node, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock; and

in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is local, transferring the data item and the lock associated with the data item to the second node with a role of local assigned to the lock.

16. The non-transitory computer-readable storage medium of claim 15 , wherein the lock allows the second node to modify the data item.

17. The non-transitory computer-readable storage medium of claim 16 , wherein the lock is an exclusive lock.

18. The non-transitory computer-readable storage medium of claim 15 , wherein the data item has been dirtied by another node but not by the first node, and wherein the non-transitory first node does not link the data item to a dirty queue of the first node.

19. The non-transitory computer-readable storage medium of claim 15 , wherein the data item has been dirtied by the first node, and wherein the instructions comprise instructions, that when executed by the one or more processors, cause:

retaining a copy of the data item, which is linked to a dirty queue of the first node, even after the data item has been transferred to the second node.

20. The non-transitory computer-readable storage medium of claim 15 , wherein transferring further comprises:

in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is global, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock.

Continuity (6)
Division 11708721 · Feb 20, 2007
Division 10091618 · Mar 4, 2002
Continuation In Part 09199120 · Nov 24, 1998
Provisional Application 60274270 · Mar 7, 2001
Provisional Application 60074587 · Feb 13, 1998
Related Publication 20110295822A1 · Dec 1, 2011