Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove trailing slash when building metadata location in Iceberg #13984

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

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Sep 5, 2022

Description

stripTrailingSlash is already used in IcebergUtil#getLocationProvider > locationsFor for data path. We may want additional handling for double slash in the middle of path, but removing trailing slash anyway as data path.
Fixes #13759

Documentation

(x) No documentation is needed.

Release notes

(x) Release notes entries required with the following suggested text:

# Iceberg
* Fix creating metadata and manifest files with url encoded name when the metadata location has trailing slashes on S3. ({issue}`13759`)

@findepi
Copy link
Member

findepi commented Sep 5, 2022

Remove trailing spaces when building metadata location in Iceberg

"spaces" or "slash"?

also, what's the end-user effect of the change?

@ebyhr
Copy link
Member Author

ebyhr commented Sep 5, 2022

My bad, it's "slash".

Before this change, the connector created metadata files with fragments on S3 when the metadata location has trailing slashes likes CREATE TABLE ... WITH (location = 's3://.../'). Probably, #13530 introduced this bug.

aws s3 ls s3://.../metadata/
2022-09-05 12:21:54       1593 00000-aeacb940-209f-4b60-806a-b0d27866d8a1.metadata.json#%2Febyhr%2Ftest_13759_4%2F%2Fmetadata%2F00000-aeacb940-209f-4b60-806a-b0d27866d8a1.metadata.json
...
2022-09-05 12:57:42       6447 2dcd8027-d149-4a37-bd55-36675487a88c-m0.avro#%2Febyhr%2Ftest_13759_4%2F%2Fmetadata%2F2dcd8027-d149-4a37-bd55-36675487a88c-m0.avro

@ebyhr ebyhr changed the title Remove trailing spaces when building metadata location in Iceberg Remove trailing slash when building metadata location in Iceberg Sep 5, 2022
@ebyhr ebyhr force-pushed the ebi/iceberg-s3-path-regression branch from 61230f4 to 9194f0f Compare September 5, 2022 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Regression on v393 -- Iceberg can't find key on S3
3 participants