You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Matt Ryan (JIRA)" <ji...@apache.org> on 2018/11/08 15:22:00 UTC

[jira] [Commented] (OAK-7887) [S3DataStore] HTTP 409 returned S3 in init() can cause init() failure

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

Matt Ryan commented on OAK-7887:
--------------------------------

I modified {{S3Backend.init()}} so that during the call to create a bucket if it doesn't exist it can handle a 409 from AWS, wait, and then retry (checking first if the bucket exists again), up to 10 times before giving up.

This change was tested in the CI server and the errors went away so I suspect it was sufficient in addressing the issue.

However, I wonder if a better place to do this would be in the test code.  When the tests start we could use similar logic to make sure a bucket is created for the test.  Then we don't burden the production code with this logic, but instead allow a simple try and fail if the bucket can't be created the first time.  The odds of this error happening in production seem extremely low.

[~amjain] what do you think?

> [S3DataStore] HTTP 409 returned S3 in init() can cause init() failure
> ---------------------------------------------------------------------
>
>                 Key: OAK-7887
>                 URL: https://issues.apache.org/jira/browse/OAK-7887
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: blob-cloud
>            Reporter: Matt Ryan
>            Assignee: Matt Ryan
>            Priority: Minor
>
> When running S3DataStore tests on Jenkins CI, about 10% of the tests failed for the same reason:  a 409 error code returned from Amazon during the {{init()}} method of {{S3Backend}}.  I suspect this is being caused by the call to create the bucket if it doesn't already exist.
> To fix this we would need to implement some retry logic in the {{init()}} call.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)