[ 
https://issues.apache.org/jira/browse/HADOOP-13449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15669245#comment-15669245
 ] 

Aaron Fabbri commented on HADOOP-13449:
---------------------------------------

{quote}
I see the difference that we have now. After import, I was treating the DDB as 
the consistent store and authoritative by default. 
{quote}

An import process *could* set all directory entries as authoritative.. Or, for 
v1, you could always return authoritative = false.  The ideal third option is 
to set directories as authoritative (fully-cached) only when the client does so 
via put(DirListingMetadata). The interface allows any of these behaviors.  None 
of them should require changing the API semantics or the MS Contract tests, 
unless there is a bug in my tests  :-)

For the ideal option #3, where would you store the isAuthoritative bit without 
extra queries?  Maybe that is future work. I have some ideas.

{quote}
Suppose we have /a, /a/b, /a/c, for delete operations, we delete /a/ first; if 
other thread/process comes to list /a, it returns null (because /a is not 
there) indicating the subtree does not exist, though /a/b/ and /a/c/ are there. 
{quote}

That sounds like valid behavior.  There are many race conditions for concurrent 
directory updates, both with, and without, S3Guard.

(Slightly related: The filesystem is responsible for ensuring that the delete 
to /a must be recursive since it is not empty.  MetadataStore explicitly does 
not do that.)

{quote}
Another question is that, if another process bypasses S3Guard and puts a new 
entry to /a/d/, do we have to make sure /a/d be added to the store by checking 
S3? I was thinking not; S3Guard guards those who buy it.
{quote}

Correct.  Consistency only works for those that use S3Guard.  If 
fs.s3a.metadatastore.authoritative config is false (default) the client will 
ignore the isAuthoritative return value from listChildren(), and will *always* 
check S3 in addition to the MetadataStore.  In this configuration, clients will 
discover files added outside of S3Guard.  Those will be subject to eventual 
consistency, of course.

{quote}
 As to the concern of not strictly having parent directories pre-created, is 
importing the only one?
{quote}
You either have to (A) pay money to store an extra copy of your metadata 
forever, or (B) spend money and time hydrating the MetadataStore each time you 
start a cluster.

Also, if there are failures (DynamoDB is famous for throttling users and being 
difficult to provision properly), and we don't assume everything is always in 
DynamoDB, it makes recovery *much* easier.  In general, you can invalidate 
state in the MetadataStore by just removing paths or subtrees, and the client 
will adaptively reload those parts from S3.

The other concern is that I just don't understand why you would want to do the 
preloading.

Can you elaborate a bit on why do you want to have parent directories 
pre-created? Which operation does it help with?

JIRA communication is a bit difficult.  I'm happy to host a public conference 
call if that would help.




> S3Guard: Implement DynamoDBMetadataStore.
> -----------------------------------------
>
>                 Key: HADOOP-13449
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13449
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>            Reporter: Chris Nauroth
>            Assignee: Mingliang Liu
>         Attachments: HADOOP-13449-HADOOP-13345.000.patch, 
> HADOOP-13449-HADOOP-13345.001.patch, HADOOP-13449-HADOOP-13345.002.patch, 
> HADOOP-13449-HADOOP-13345.003.patch, HADOOP-13449-HADOOP-13345.004.patch
>
>
> Provide an implementation of the metadata store backed by DynamoDB.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to