Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle BlobPath's trailing separator case. Add test cases to BlobPathTests.java #23091

Merged
merged 1 commit into from
Feb 22, 2017
Merged

Handle BlobPath's trailing separator case. Add test cases to BlobPathTests.java #23091

merged 1 commit into from
Feb 22, 2017

Conversation

mms-programming
Copy link
Contributor

When a trailing / is present at the end of base_path in s3 repository creation, an extra slash still gets prepended and this causes S3 to create an empty folder. This was not a problem in our ES 2.4 cluster as we always included the / at the end and was dealt with here:

https://github.com/elastic/elasticsearch/blob/v2.4.4/plugins/cloud-aws/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java#L140-L146.

Specifically, the splitStringToArray on L142 got rid of the trailing slashes.

This pull request fixes the trailing / issue. It also adds extra test case to BlobPathTests.java.

@elasticmachine
Copy link
Collaborator

Can one of the admins verify this patch?

@mms-programming
Copy link
Contributor Author

Any updates on this pull request? Anything I need to change or update?

@clintongormley
Copy link

@tlrx could you review this please?

Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for your contribution @mms-programming ! The kind of small bugs that are really annoying... And sorry for the time it took me to review your fix.

@tlrx tlrx merged commit d31e415 into elastic:master Feb 22, 2017
tlrx pushed a commit that referenced this pull request Feb 22, 2017
@mms-programming
Copy link
Contributor Author

@tlrx happy to contribute!

@clintongormley clintongormley added :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs and removed :Plugin Repository S3 labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v5.4.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants