-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-17365. Contract test for renaming over existing file is too lenient #2447
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
Conversation
…nient Change-Id: Iabccda5f1c150cbb7ccf4596d337f1dd740da37d
|
🎊 +1 overall
This message was automatically generated. |
|
makes sense. |
|
Thanks @steveloughran for taking a look.
Those were skipped by Maven, due to missing |
Afraid not, except in the special case you have a minio s3 server. If you don't have them, I'll merge them, and if something does fail then we'll decide whether to revert or address the failure |
…nient (#2447) Contributed by Attila Doroszlai. Change-Id: I21c29256b52449b7fea335704b3afa02e39c6a39
|
Thanks @steveloughran for reviewing and committing it. |
|
I managed to run Inspecting S3AFileSystem, it seems rename file over existing file is intended to return false: hadoop/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java Lines 1383 to 1386 in fc961b6
and hadoop/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java Lines 1452 to 1458 in fc961b6
I think it should be declared in the contract xml. |
|
Yeah, I'd just seen that breakage too. |
|
ok, so the FS contract says rename-over-file should be rejected. S3A doesn't do that, but then we have to worry about delayed consistency, where a newly deleted file may still be found with HEAD, so we have to go with allowing the rename to succeed. Pity
|
What changes were proposed in this pull request?
Add some assertions to make sure the result of
rename()over existing filemore closely matches expectations defined by contract options
rename-returns-false-if-dest-existsandrename-overwrites-dest.https://issues.apache.org/jira/browse/HADOOP-17365
How was this patch tested?
Ran related contract tests in Hadoop project:
(also some others for S3A and Azure, but tests in those were skipped).
Also ran Ozone rename contract test with various combinations of these two contract options after overriding
testRenameFileOverExistingFile().