Skip to content

HADOOP-16380. S3A non-recursive deletion of root to return false #1106

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

bgaborg
Copy link

@bgaborg bgaborg commented Jul 16, 2019

No description provided.

@bgaborg bgaborg requested a review from steveloughran July 16, 2019 17:15
@bgaborg
Copy link
Author

bgaborg commented Jul 16, 2019

Tests run against ireland with known tesMRJob errors. There was an error but cleared on the rerun

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 79 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 mvninstall 1164 trunk passed
+1 compile 33 trunk passed
+1 checkstyle 23 trunk passed
+1 mvnsite 40 trunk passed
+1 shadedclient 865 branch has no errors when building and testing our client artifacts.
+1 javadoc 29 trunk passed
0 spotbugs 70 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 68 trunk passed
_ Patch Compile Tests _
+1 mvninstall 40 the patch passed
+1 compile 36 the patch passed
+1 javac 36 the patch passed
+1 checkstyle 21 the patch passed
+1 mvnsite 39 the patch passed
+1 whitespace 1 The patch has no whitespace issues.
+1 shadedclient 946 patch has no errors when building and testing our client artifacts.
+1 javadoc 27 the patch passed
+1 findbugs 76 the patch passed
_ Other Tests _
+1 unit 290 hadoop-aws in the patch passed.
+1 asflicense 35 The patch does not generate ASF License warnings.
3926
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/1/artifact/out/Dockerfile
GITHUB PR #1106
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 538d63aa2f9d 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / c5e3ab5
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/1/testReport/
Max. process+thread count 330 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@steveloughran steveloughran added bug fs/s3 changes related to hadoop-aws; submitter must declare test endpoint labels Jul 16, 2019
@@ -2193,6 +2193,13 @@ void removeKeys(
*/
@Retries.RetryTranslated
public boolean delete(Path f, boolean recursive) throws IOException {
if (f.isRoot()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go after the entrypoint, so that the metrics are incremented and FS open/closed state are checked

@steveloughran
Copy link
Contributor

I need to look at the source a bit more here; I think we need to make sure the behaviour on an rm (root, recursive=true) is handled properly too, which for s3a can/should just be an outright rejection

This is probably time to make the behaviour on the rm root operations something to not just clarify a bit more in filesystem.md but also in the contract options for all filestores, define what happens. Yes, I am making life hard for you here, but this is how we nail down the corner cases of what filesystems are meant to do

Document that object stores will return false on deletion of root
@bgaborg
Copy link
Author

bgaborg commented Jul 17, 2019

I have an integration test failure with this patch:

[ERROR] test_400_rm_root_recursive(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardDDBRootOperations)  Time elapsed: 9.777 s  <<< FAILURE!
java.lang.AssertionError: Root directory delete failed
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardDDBRootOperations.test_400_rm_root_recursive(ITestS3GuardDDBRootOperations.java:237)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:748)

I'll take a look at this tomorrow.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 87 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
0 mvndep 87 Maven dependency ordering for branch
+1 mvninstall 1545 trunk passed
+1 compile 1397 trunk passed
+1 checkstyle 183 trunk passed
+1 mvnsite 183 trunk passed
+1 shadedclient 1304 branch has no errors when building and testing our client artifacts.
+1 javadoc 130 trunk passed
0 spotbugs 90 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 252 trunk passed
_ Patch Compile Tests _
0 mvndep 29 Maven dependency ordering for patch
+1 mvninstall 102 the patch passed
+1 compile 1333 the patch passed
+1 javac 1333 the patch passed
+1 checkstyle 195 the patch passed
+1 mvnsite 162 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 909 patch has no errors when building and testing our client artifacts.
+1 javadoc 129 the patch passed
+1 findbugs 265 the patch passed
_ Other Tests _
+1 unit 676 hadoop-common in the patch passed.
+1 unit 314 hadoop-aws in the patch passed.
+1 asflicense 63 The patch does not generate ASF License warnings.
9330
Subsystem Report/Notes
Docker Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/2/artifact/out/Dockerfile
GITHUB PR #1106
Optional Tests dupname asflicense mvnsite compile javac javadoc mvninstall unit shadedclient findbugs checkstyle
uname Linux 3f66d0d0aae1 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / c58e11b
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/2/testReport/
Max. process+thread count 1613 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/2/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@bgaborg
Copy link
Author

bgaborg commented Jul 17, 2019

fixed last failing test. tested against ireland, no failures other than testMRJob

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 38 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
0 mvndep 26 Maven dependency ordering for branch
+1 mvninstall 1057 trunk passed
+1 compile 1094 trunk passed
+1 checkstyle 141 trunk passed
+1 mvnsite 131 trunk passed
+1 shadedclient 1015 branch has no errors when building and testing our client artifacts.
+1 javadoc 106 trunk passed
0 spotbugs 69 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 189 trunk passed
_ Patch Compile Tests _
0 mvndep 24 Maven dependency ordering for patch
+1 mvninstall 80 the patch passed
+1 compile 1037 the patch passed
+1 javac 1037 the patch passed
+1 checkstyle 140 the patch passed
+1 mvnsite 129 the patch passed
+1 whitespace 1 The patch has no whitespace issues.
+1 shadedclient 689 patch has no errors when building and testing our client artifacts.
+1 javadoc 107 the patch passed
+1 findbugs 205 the patch passed
_ Other Tests _
-1 unit 487 hadoop-common in the patch failed.
+1 unit 308 hadoop-aws in the patch passed.
+1 asflicense 39 The patch does not generate ASF License warnings.
7063
Reason Tests
Failed junit tests hadoop.ipc.TestIPC
Subsystem Report/Notes
Docker Client=18.09.8 Server=18.09.8 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/3/artifact/out/Dockerfile
GITHUB PR #1106
Optional Tests dupname asflicense mvnsite compile javac javadoc mvninstall unit shadedclient findbugs checkstyle
uname Linux 811294b27df1 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5e6cc6f
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/3/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/3/testReport/
Max. process+thread count 1463 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@@ -2195,6 +2195,10 @@ void removeKeys(
public boolean delete(Path f, boolean recursive) throws IOException {
try {
entryPoint(INVOCATION_DELETE);
if (f.isRoot()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you're going to have to qualify the path. this is done in getFilestatus() in the main delete codepath, but now you'll have to do it first (you can reuse that path in L2199 and L2202, obviously)

Thinking about this, all we need is your change to rejectRootDirectoryDelete(), without needing any other changes to the delete/innerDelete codepath. Yes, we'll do a needless getFileStatus and return the wrong empty flag if there's a tombstone, but that "feature" is still there no matter what. And I don't care about performance here given the operation will always be rejected

@steveloughran
Copy link
Contributor

-1 as is, because we need that qualified path.

I'd also like the empty dir test of PR #1079 retained. Even though for the root directory it is now moot, its critical we have the test to ensure that there's never any regression in the empty dir checks for child entries.

Let me take this over by merging this PR into mine, modifying my new test to test a child dir where the empty dir checks MUST work

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 42 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 1 The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
0 mvndep 68 Maven dependency ordering for branch
+1 mvninstall 1098 trunk passed
+1 compile 1045 trunk passed
+1 checkstyle 136 trunk passed
+1 mvnsite 115 trunk passed
+1 shadedclient 905 branch has no errors when building and testing our client artifacts.
+1 javadoc 90 trunk passed
0 spotbugs 63 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 178 trunk passed
_ Patch Compile Tests _
0 mvndep 23 Maven dependency ordering for patch
+1 mvninstall 74 the patch passed
+1 compile 1139 the patch passed
+1 javac 1139 the patch passed
+1 checkstyle 145 the patch passed
+1 mvnsite 119 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 669 patch has no errors when building and testing our client artifacts.
+1 javadoc 94 the patch passed
+1 findbugs 212 the patch passed
_ Other Tests _
+1 unit 531 hadoop-common in the patch passed.
+1 unit 283 hadoop-aws in the patch passed.
+1 asflicense 40 The patch does not generate ASF License warnings.
7014
Subsystem Report/Notes
Docker Client=18.09.8 Server=18.09.8 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/4/artifact/out/Dockerfile
GITHUB PR #1106
Optional Tests dupname asflicense mvnsite compile javac javadoc mvninstall unit shadedclient findbugs checkstyle
uname Linux 367e1f987b6b 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 4e66cb9
Default Java 1.8.0_212
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/4/testReport/
Max. process+thread count 1390 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1106/4/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor

This has been superceded by #1123 which is built off this PR. Closing this one to avoid confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fs/s3 changes related to hadoop-aws; submitter must declare test endpoint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants