mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
In 2.x, the S3 repository accepted a `/` (forward slash) to start the repositories.s3.base_path, and it used a different string splitting method that removed the forward slash from the base path, so there were no issues. In 5.x, we removed this custom string splitting method in favor of the JDK's string splitting method, which preserved the leading `/`. The AWS SDK does not like the leading `/` in the key path after the bucket name, and so it could not find any objects in the S3 repository. This commit fixes the issue by removing the leading `/` if it exists and adding a deprecation notice that leading `/` will not be supported in the future in S3 repository's base_path.