Consistent object renaming in distributed systems
First Claim
Patent Images
1. A system, comprising:
- one or more computing devices configured to;
receive, at a metadata subsystem of a distributed multi-tenant file store service comprising a plurality of metadata nodes, a rename request to change a name of a particular file store object from a first name to a second name, wherein, corresponding to each of a plurality of file store objects, the metadata subsystem stores a node entry and a directory entry, wherein the node entry comprises a plurality of metadata fields associated with the corresponding file store object and the directory entry includes (a) a name of the file store object and (b) a pointer to the node entry;
determine, based on deadlock avoidance analysis, that a first directory entry corresponding to the first name is to be locked as part of an initial atomic operation of a workflow sequence corresponding to the rename request, wherein the first directory entry comprises a pointer to a first node entry;
attempt the initial atomic operation at a first metadata node of a plurality of metadata nodes of the metadata subsystem, wherein the first atomic operation comprises;
(a) obtaining a lock on the first directory entry;
(b) generating a workflow identifier corresponding to the workflow sequence, and (c) storing a record of an intent to rename the particular file store object, wherein the record indicates the workflow identifier;
in response to a determination that the initial atomic operation succeeded, attempt a second atomic operation of the workflow sequence at a second metadata node of the plurality of metadata nodes responsible for storing a second directory entry associated with the second name, wherein the second atomic operation comprises;
(a) verifying that the second directory entry is unlocked;
(b) setting the second directory'"'"'s pointer to point to the first node entry; and
(c) storing an indication that a pointer modification corresponding to the workflow identifier succeeded;
in response to a determination that the second atomic operation succeeded, attempt a third set of operations of the workflow sequence, wherein the third set of operations comprises;
(a) deleting the record of the intent;
(b) deleting the lock on the first directory entry; and
(c) deleting the first directory entry.
1 Assignment
0 Petitions
Accused Products
Abstract
In response to a rename request to change a file name at a storage service from a first name to a second name, a workflow comprising at least two atomic operations is initiated. In the first atomic operation, a lock is obtained on a first directory entry for the first name, and an intent record for the rename workflow is stored. In a second atomic operation, a pointer of a second directory entry for the second name is modified, and an indication of the pointer modification is stored. In a third set of operations, the intent record is deleted, the lock is released, and the first directory entry is deleted.
37 Citations
21 Claims
-
1. A system, comprising:
one or more computing devices configured to; receive, at a metadata subsystem of a distributed multi-tenant file store service comprising a plurality of metadata nodes, a rename request to change a name of a particular file store object from a first name to a second name, wherein, corresponding to each of a plurality of file store objects, the metadata subsystem stores a node entry and a directory entry, wherein the node entry comprises a plurality of metadata fields associated with the corresponding file store object and the directory entry includes (a) a name of the file store object and (b) a pointer to the node entry; determine, based on deadlock avoidance analysis, that a first directory entry corresponding to the first name is to be locked as part of an initial atomic operation of a workflow sequence corresponding to the rename request, wherein the first directory entry comprises a pointer to a first node entry; attempt the initial atomic operation at a first metadata node of a plurality of metadata nodes of the metadata subsystem, wherein the first atomic operation comprises;
(a) obtaining a lock on the first directory entry;
(b) generating a workflow identifier corresponding to the workflow sequence, and (c) storing a record of an intent to rename the particular file store object, wherein the record indicates the workflow identifier;in response to a determination that the initial atomic operation succeeded, attempt a second atomic operation of the workflow sequence at a second metadata node of the plurality of metadata nodes responsible for storing a second directory entry associated with the second name, wherein the second atomic operation comprises;
(a) verifying that the second directory entry is unlocked;
(b) setting the second directory'"'"'s pointer to point to the first node entry; and
(c) storing an indication that a pointer modification corresponding to the workflow identifier succeeded;in response to a determination that the second atomic operation succeeded, attempt a third set of operations of the workflow sequence, wherein the third set of operations comprises;
(a) deleting the record of the intent;
(b) deleting the lock on the first directory entry; and
(c) deleting the first directory entry.- View Dependent Claims (2, 3, 4, 5)
-
6. A method, comprising:
performing, by one or more computing devices; receiving, at a storage service, a rename request to change a name of a particular file store object from a first name to a second name; determining that a first directory entry corresponding to the first name is to be locked as part of an initial atomic operation of a workflow sequence corresponding to the rename request, wherein the first directory entry comprises a pointer to a first node entry storing a plurality of metadata fields of the particular file store object; attempting the initial atomic operation comprising;
(a) obtaining a lock on the first directory entry;
(b) storing a workflow identifier corresponding to the workflow sequence, and (c) storing a record of an intent to rename the particular file store object;in response to determining that the initial atomic operation succeeded, attempting a second atomic operation of the workflow sequence comprising;
(a) verifying that a second directory entry corresponding to the second name is unlocked;
(b) setting the second directory'"'"'s pointer to point to the first node entry; and
(c) storing an indication that a pointer modification corresponding to the workflow identifier succeeded;in response to determining that the second atomic operation succeeded, attempting a third set of operations of the workflow sequence comprising;
(a) deleting the record of the intent;
(b) deleting the lock on the first directory entry; and
(c) deleting the first directory entry.- View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
17. A non-transitory computer-accessible storage medium storing program instructions that when executed on one or more processors:
in response to a particular rename request to change a name of a particular file store object at a storage service from a first name to a second name, attempt an initial atomic operation including;
(a) obtaining a lock on a first directory entry corresponding to the first name, wherein the first directory entry includes a pointer to a first node entry comprising a plurality of metadata fields pertaining to the particular file storage object; and
(b) storing a record of an intent to rename the particular file store object;in response to a determination that the initial atomic operation succeeded, request a second atomic operation comprising;
(a) setting a second directory'"'"'s pointer to point to the first node entry; and
(b) storing an indication that a pointer modification corresponding to the particular rename request succeeded;in response to a determination that the second atomic operation succeeded, attempt a third set of operations of the workflow sequence comprising;
(a) deleting the record of the intent;
(b) deleting the lock on the first directory entry; and
(c) deleting the first directory entry.- View Dependent Claims (18, 19, 20, 21)
Specification