DETERMINING A STALENESS STATE OF A DISPERSED STORAGE NETWORK LOCAL DIRECTORY
A method begins by a processing module determining a state of a dispersed storage network (DSN) local directory to be an unknown staleness state. When in the unknown staleness state, the method continues with the processing module comparing a local revision level of one of one or more local DSN directory files with a global revision level of a corresponding global DSN directory file. When the local revision level compares unfavorably to the global revision level, the method continues with the processing module updating the state of the DSN local directory to a stale state. When the local revision level compares favorably to the global revision level, the method continues with the processing module updating the state of the DSN local directory to a not-stale state.
1 . A method comprises:
determining a state of a dispersed storage network (DSN) local directory to be an unknown staleness state, wherein the DSN local directory includes one or more local DSN directory files, wherein a local DSN directory file of the one or more local DSN directory files includes one or more entries, wherein an entry of the one or more entries includes a path name and a source name, and wherein each of the one or more local DSN directory files is encoded using a dispersed storage error coding function to produce a set of encoded directory slices that is stored in at least one of a DSN memory and a local memory; and
when in the unknown staleness state:
comparing a local revision level of one of the one or more local DSN directory files with a global revision level of a corresponding global DSN directory file;
when the local revision level compares unfavorably to the global revision level, updating the state of the DSN local directory to a stale state; and
when the local revision level compares favorably to the global revision level, updating the state of the DSN local directory to a not-stale state.
2 . The method of claim 1 , wherein the determining the DSN local directory to be in the unknown staleness state comprises:
determining whether a cycle timer has expired; and
when the cycle timer has expired, indicating that the DSN local directory is in the unknown staleness state.
3 . The method of claim 1 further comprises:
when the DSN local directory is in the stale state;
identifying a stale local DSN directory file of the one or more local DSN directory files;
retrieving a corresponding DSN directory file from a global directory that is stored in the DSN memory;
updating the stale local DSN directory file based on the corresponding DSN directory file; and
changing the state of the local directory to the not-stale state.
4 . The method of claim 1 , wherein the comparing the local revision level with the global revision level comprises:
comparing a local slice revision level of an encoded directory slice of the set of encoded directory slices of the one of the one or more local DSN directory files with a global slice revision level of a corresponding encoded directory slice of a set of encoded directory slices of the corresponding global DSN directory file.
5 . The method of claim 4 further comprises:
obtaining the local slice revision level by one of:
retrieving the local slice revision level from the DSN memory; and
retrieving the local slice revision level from the local memory; and
transmitting a read global directory slice request regarding the corresponding encoded directory slice to the DSN memory; and
receiving the corresponding encoded directory slice from the DSN memory, wherein the corresponding encoded directory slice includes the global slice revision level.
6 . The method of claim 4 further comprises:
transmitting a DSN concurrency directory slice request that includes the local slice revision level to the DSN memory;
receiving a DSN concurrency directory slice response; and
extracting a status code from the DSN concurrency directory slice response, wherein the status code indicates whether the local slice revision level compares favorably or unfavorably to the global slice revision level.
7 . The method of claim 1 , wherein the entry further comprises:
extended data that includes the local revision level.
8 . The method of claim 1 , wherein the comparing the local revision level with the global revision level comprises:
comparing the local revision level of one of the one or more local DSN directory files with a global slice revision level of a corresponding encoded directory slice of a set of encoded directory slices of the corresponding global DSN directory file.
9 . The method of claim 1 , wherein the comparing the local revision level with the global revision level comprises:
comparing a local slice revision level of an encoded directory slice of the set of encoded directory slices of one of the one or more local DSN directory files with the global revision level of the corresponding global DSN directory file.
10 . The method of claim 1 , wherein the determining the state of the DSN local directory is in the unknown staleness state comprises at least one of:
detecting creation of a new directory entry within the DSN local directory;
detecting modification of an existing directory entry within the DSN local directory;
detecting that directory access frequency of the DSN local directory compares unfavorably to an access threshold;
determining that the DSN local directory is not stored in the local memory; and
receiving a checked write response that includes an indication that the local revision level compares unfavorably to the global revision level.
11 . A dispersed storage (DS) module comprises:
a first module operable to determine a state of a dispersed storage network (DSN) local directory to be an unknown staleness state, wherein the DSN local directory includes one or more local DSN directory files, wherein a local DSN directory file of the one or more local DSN directory files includes one or more entries, wherein an entry of the one or more entries includes a path name and a source name, and wherein each of the one or more local DSN directory files is encoded using a dispersed storage error coding function to produce a set of encoded directory slices that is stored in at least one of a DSN memory and a local memory; and
when in the unknown staleness state:
a second module operable to compare a local revision level of one of the one or more local DSN directory files with a global revision level of a corresponding global DSN directory file; and
a third module operable to:
when the local revision level compares unfavorably to the global revision level, update the state of the DSN local directory to a stale state; and
when the local revision level compares favorably to the global revision level, update the state of the DSN local directory to a not-stale state.
12 . The DS module of claim 11 , wherein the first module is further operable to determine the DSN local directory to be in the unknown staleness state by:
determining whether a cycle timer has expired; and
when the cycle timer has expired, indicating that the DSN local directory is in the unknown staleness state.
13 . The DS module of claim 11 further comprises:
when the DSN local directory is in the stale state;
a fourth module operable to identify a stale local DSN directory file of the one or more local DSN directory files;
a fifth module operable to retrieve a corresponding DSN directory file from a global directory that is stored in the DSN memory;
a sixth module operable to update the stale local DSN directory file based on the corresponding DSN directory file; and
the third module operable to change the state of the local directory to the not-stale state.
14 . The DS module of claim 11 , wherein the second module is further operable to compare the local revision level with the global revision level by:
comparing a local slice revision level of an encoded directory slice of the set of encoded directory slices of the one of the one or more local DSN directory files with a global slice revision level of a corresponding encoded directory slice of a set of encoded directory slices of the corresponding global DSN directory file.
15 . The DS module of claim 14 further comprises:
a seventh module operable to obtain the local slice revision level by one of:
retrieving the local slice revision level from the DSN memory; and
retrieving the local slice revision level from the local memory; and
an eight module operable to:
transmit a read global directory slice request regarding the corresponding encoded directory slice to the DSN memory; and
receive the corresponding encoded directory slice from the DSN memory, wherein the corresponding encoded directory slice includes the global slice revision level.
16 . The DS module of claim 14 further comprises:
a ninth module operable to:
transmit a DSN concurrency directory slice request that includes the local slice revision level to the DSN memory;
receive a DSN concurrency directory slice response; and
extract a status code from the DSN concurrency directory slice response, wherein the status code indicates whether the local slice revision level compares favorably or unfavorably to the global slice revision level.
17 . The DS module of claim 11 , wherein the entry further comprises:
extended data that includes the local revision level.
18 . The DS module of claim 11 , wherein the second module is further operable to compare the local revision level with the global revision level by:
comparing the local revision level of one of the one or more local DSN directory files with a global slice revision level of a corresponding encoded directory slice of a set of encoded directory slices of the corresponding global DSN directory file.
19 . The DS module of claim 11 , wherein the second module is further operable to compare the local revision level with the global revision level by:
comparing a local slice revision level of an encoded directory slice of the set of encoded directory slices of one of the one or more local DSN directory files with the global revision level of the corresponding global DSN directory file.
20 . The DS module of claim 11 , wherein the first module is further operable to determine the state of the DSN local directory is in the unknown staleness state by at least one of:
detecting creation of a new directory entry within the DSN local directory;
detecting modification of an existing directory entry within the DSN local directory;
detecting that directory access frequency of the DSN local directory compares unfavorably to an access threshold;
determining that the DSN local directory is not stored in the local memory; and
receiving a checked write response that includes an indication that the local revision level compares unfavorably to the global revision level.