Skip to content

Conversation

@bharatviswa504
Copy link
Contributor

No description provided.

@bharatviswa504 bharatviswa504 self-assigned this Jun 12, 2019
@bharatviswa504 bharatviswa504 changed the title OzoneManager Lock change the volumeLock weight to 0 HDDS-1672. OzoneManager Lock change the volumeLock weight to 0 Jun 12, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 31 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 30 Maven dependency ordering for branch
+1 mvninstall 507 trunk passed
+1 compile 298 trunk passed
+1 checkstyle 89 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 900 branch has no errors when building and testing our client artifacts.
+1 javadoc 181 trunk passed
0 spotbugs 333 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 522 trunk passed
_ Patch Compile Tests _
0 mvndep 26 Maven dependency ordering for patch
+1 mvninstall 465 the patch passed
+1 compile 308 the patch passed
+1 javac 308 the patch passed
+1 checkstyle 93 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 1 The patch has no whitespace issues.
+1 shadedclient 677 patch has no errors when building and testing our client artifacts.
+1 javadoc 181 the patch passed
+1 findbugs 538 the patch passed
_ Other Tests _
-1 unit 164 hadoop-hdds in the patch failed.
-1 unit 1022 hadoop-ozone in the patch failed.
+1 asflicense 63 The patch does not generate ASF License warnings.
6302
Reason Tests
Failed junit tests hadoop.ozone.container.ozoneimpl.TestOzoneContainer
hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/1/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 3e39993fa5fc 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 4ea6c2f
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/1/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/1/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/1/testReport/
Max. process+thread count 4789 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/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.

@anuengineer
Copy link
Contributor

Unless I am completely out of my mind, this is a dangerous patch to commit. We need to prove that taking user locks after volume locks is consistent across all paths.

Right now, we think of user/volume/bucket/key as a logical hierarchy. Yes, there are cases where you only have volume and you have to look back up the path, and in that case, you might have to release a lock already taken. But that is not an excuse to change the locking hierarchy if you want to do that, You need to write down a locking conflict resolution table and prove that all paths are consistent.

That is what we did when we first developed this locking hierarchy table, Yes, it is a bit of work now, but will save us countless hours of work and pain in the future.

Let us not commit this unless we have such a table. As I said, it might be that this is correct, but this is a place where we have to be sure that this is correct.

@bharatviswa504
Copy link
Contributor Author

bharatviswa504 commented Jun 12, 2019

Unless I am completely out of my mind, this is a dangerous patch to commit. We need to prove that taking user locks after volume locks is consistent across all paths.

Right now, we think of user/volume/bucket/key as a logical hierarchy. Yes, there are cases where you only have volume and you have to look back up the path, and in that case, you might have to release a lock already taken. But that is not an excuse to change the locking hierarchy if you want to do that, You need to write down a locking conflict resolution table and prove that all paths are consistent.

That is what we did when we first developed this locking hierarchy table, Yes, it is a bit of work now, but will save us countless hours of work and pain in the future.

Let us not commit this unless we have such a table. As I said, it might be that this is correct, but this is a place where we have to be sure that this is correct.

Thank You @anuengineer for the comments.
Could you provide a table which has been written when it is first designed? I can take a look at it, and see what is meant by locking conflict resolution table, and see how to come up with such a table, and see if this is breaking any thing.

@anuengineer
Copy link
Contributor

Thank You @anuengineer for the comments.
Could you provide a table which has been written when it is first designed? I can take a look at it, and >see what is meant by locking conflict resolution table, and see how to come up with such a table, and >see if this is breaking anything.

I will try to find it, @nandakumar131 and I worked on this together, I think Nanda wrote that document. These are the kind of docs I wish were committed it the design repo so that we can find them when we need. I don't think that doc was posted to Apache, But I will see if I can find it, else we will have to rebuild that lock conflict table.

@arp7
Copy link
Contributor

arp7 commented Jun 12, 2019

You need to write down a locking conflict resolution table and prove that all paths are consistent.

@anuengineer could you please clarify what this table looks like? This is the first time in 20+ years of writing multi-threaded code that I have have heard of a locking conflict resolution table. I have only heard of locking order so far. 🙂

@anuengineer
Copy link
Contributor

@anuengineer could you please clarify what this table looks like? This is the first time in 20+ years of writing multi-threaded code that I have have heard of a locking conflict resolution table. I have only heard of locking order so far. 🙂

Something like

Lock Levels - User=0, Volume=1,Bucket=2, Key =3

Create Volume -> Locking Order -> Lock User, LockVolume , Release Volume, Release User
Update Volume, Locking Order -> L(V), R(V) L(U), L(V), R(V), R(U).

For each path, you know what the locking order is. We have a lock hierarchy very clearly defined today, changing that order means that you need to make sure no other path which is taking those locks are now violating the proposed order. We need to manually list out each lock path in the OM to move user lock from level O to level 1.

In other words, changing lock hierarchy in any code path is a non-trivial. This process will prove that our hierarchy itself is not buggy, and you don't run into this same problem is some other path, since you have optimized code for this path.

@arp7
Copy link
Contributor

arp7 commented Jun 12, 2019

Thank you that makes perfect sense. We will write that up.

@bharatviswa504 bharatviswa504 changed the title HDDS-1672. OzoneManager Lock change the volumeLock weight to 0 HDDS-1672. Improve locking in OzoneManager. Jun 20, 2019
@bharatviswa504
Copy link
Contributor Author

Thank You @anuengineer for the suggestion to write up the document.
And also helping in reviewing the document. Attached the same to HDDS-1672 Jira.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 39 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 48 Maven dependency ordering for branch
+1 mvninstall 503 trunk passed
+1 compile 253 trunk passed
+1 checkstyle 70 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 902 branch has no errors when building and testing our client artifacts.
+1 javadoc 164 trunk passed
0 spotbugs 355 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 575 trunk passed
_ Patch Compile Tests _
0 mvndep 21 Maven dependency ordering for patch
+1 mvninstall 491 the patch passed
+1 compile 266 the patch passed
+1 javac 266 the patch passed
-0 checkstyle 39 hadoop-ozone: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 703 patch has no errors when building and testing our client artifacts.
+1 javadoc 179 the patch passed
+1 findbugs 597 the patch passed
_ Other Tests _
+1 unit 320 hadoop-hdds in the patch passed.
-1 unit 186 hadoop-ozone in the patch failed.
+1 asflicense 38 The patch does not generate ASF License warnings.
5596
Reason Tests
Failed junit tests hadoop.ozone.om.request.volume.TestOMVolumeSetOwnerRequest
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/3/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 8b6e44c39d6d 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5bfdf62
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-949/3/artifact/out/diff-checkstyle-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/3/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/3/testReport/
Max. process+thread count 1343 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 662 Docker mode activated.
_ Prechecks _
+1 dupname 1 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 43 Maven dependency ordering for branch
+1 mvninstall 503 trunk passed
+1 compile 246 trunk passed
+1 checkstyle 73 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 854 branch has no errors when building and testing our client artifacts.
+1 javadoc 149 trunk passed
0 spotbugs 310 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 496 trunk passed
_ Patch Compile Tests _
0 mvndep 25 Maven dependency ordering for patch
+1 mvninstall 451 the patch passed
+1 compile 270 the patch passed
+1 javac 270 the patch passed
-0 checkstyle 42 hadoop-ozone: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 672 patch has no errors when building and testing our client artifacts.
+1 javadoc 161 the patch passed
+1 findbugs 521 the patch passed
_ Other Tests _
+1 unit 242 hadoop-hdds in the patch passed.
-1 unit 150 hadoop-ozone in the patch failed.
+1 asflicense 45 The patch does not generate ASF License warnings.
5831
Reason Tests
Failed junit tests hadoop.ozone.om.request.volume.TestOMVolumeSetOwnerRequest
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/2/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux b93a4f481759 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5bfdf62
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-949/2/artifact/out/diff-checkstyle-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/2/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/2/testReport/
Max. process+thread count 1313 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 25 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 45 Maven dependency ordering for branch
+1 mvninstall 497 trunk passed
+1 compile 245 trunk passed
+1 checkstyle 69 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 907 branch has no errors when building and testing our client artifacts.
+1 javadoc 151 trunk passed
0 spotbugs 314 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 506 trunk passed
_ Patch Compile Tests _
0 mvndep 21 Maven dependency ordering for patch
+1 mvninstall 433 the patch passed
+1 compile 251 the patch passed
+1 javac 251 the patch passed
+1 checkstyle 72 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 734 patch has no errors when building and testing our client artifacts.
+1 javadoc 151 the patch passed
+1 findbugs 521 the patch passed
_ Other Tests _
+1 unit 246 hadoop-hdds in the patch passed.
-1 unit 145 hadoop-ozone in the patch failed.
+1 asflicense 37 The patch does not generate ASF License warnings.
5221
Reason Tests
Failed junit tests hadoop.ozone.om.request.volume.TestOMVolumeSetOwnerRequest
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/5/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 770e74160c56 4.4.0-143-generic #169~14.04.2-Ubuntu SMP Wed Feb 13 15:00:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5bfdf62
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/5/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/5/testReport/
Max. process+thread count 1249 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/5/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 50 Docker mode activated.
_ Prechecks _
+1 dupname 1 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 13 Maven dependency ordering for branch
+1 mvninstall 551 trunk passed
+1 compile 281 trunk passed
+1 checkstyle 70 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 881 branch has no errors when building and testing our client artifacts.
+1 javadoc 161 trunk passed
0 spotbugs 370 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 571 trunk passed
_ Patch Compile Tests _
0 mvndep 21 Maven dependency ordering for patch
+1 mvninstall 490 the patch passed
+1 compile 292 the patch passed
+1 javac 292 the patch passed
+1 checkstyle 89 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 702 patch has no errors when building and testing our client artifacts.
+1 javadoc 156 the patch passed
+1 findbugs 523 the patch passed
_ Other Tests _
-1 unit 173 hadoop-hdds in the patch failed.
-1 unit 168 hadoop-ozone in the patch failed.
+1 asflicense 39 The patch does not generate ASF License warnings.
5403
Reason Tests
Failed junit tests hadoop.ozone.container.ozoneimpl.TestOzoneContainer
hadoop.ozone.om.request.volume.TestOMVolumeSetOwnerRequest
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/4/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 36d2b0a7d0d7 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5bfdf62
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/4/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/4/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/4/testReport/
Max. process+thread count 1320 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/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.

@bharatviswa504
Copy link
Contributor Author

/retest

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 29 Docker mode activated.
_ Prechecks _
+1 dupname 1 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 12 Maven dependency ordering for branch
+1 mvninstall 484 trunk passed
+1 compile 248 trunk passed
+1 checkstyle 72 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 813 branch has no errors when building and testing our client artifacts.
+1 javadoc 161 trunk passed
0 spotbugs 308 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 497 trunk passed
_ Patch Compile Tests _
0 mvndep 27 Maven dependency ordering for patch
+1 mvninstall 455 the patch passed
+1 compile 272 the patch passed
+1 javac 272 the patch passed
+1 checkstyle 79 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 661 patch has no errors when building and testing our client artifacts.
+1 javadoc 160 the patch passed
+1 findbugs 515 the patch passed
_ Other Tests _
-1 unit 159 hadoop-hdds in the patch failed.
-1 unit 1102 hadoop-ozone in the patch failed.
+1 asflicense 45 The patch does not generate ASF License warnings.
5964
Reason Tests
Failed junit tests hadoop.ozone.container.ozoneimpl.TestOzoneContainer
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.hdds.scm.pipeline.TestRatisPipelineProvider
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.hdds.scm.pipeline.TestSCMPipelineManager
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/6/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 20e2b00f161d 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5bfdf62
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/6/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/6/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/6/testReport/
Max. process+thread count 4860 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/6/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 30 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 48 Maven dependency ordering for branch
+1 mvninstall 487 trunk passed
+1 compile 255 trunk passed
+1 checkstyle 74 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 855 branch has no errors when building and testing our client artifacts.
+1 javadoc 166 trunk passed
0 spotbugs 307 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 495 trunk passed
_ Patch Compile Tests _
0 mvndep 25 Maven dependency ordering for patch
+1 mvninstall 443 the patch passed
+1 compile 264 the patch passed
+1 javac 264 the patch passed
+1 checkstyle 78 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 668 patch has no errors when building and testing our client artifacts.
+1 javadoc 148 the patch passed
+1 findbugs 518 the patch passed
_ Other Tests _
+1 unit 250 hadoop-hdds in the patch passed.
-1 unit 963 hadoop-ozone in the patch failed.
+1 asflicense 47 The patch does not generate ASF License warnings.
5992
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/7/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux e387b3471b95 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 / 5bfdf62
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/7/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/7/testReport/
Max. process+thread count 4696 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/7/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 30 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 38 Maven dependency ordering for branch
+1 mvninstall 459 trunk passed
+1 compile 240 trunk passed
+1 checkstyle 60 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 785 branch has no errors when building and testing our client artifacts.
+1 javadoc 148 trunk passed
0 spotbugs 314 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 504 trunk passed
_ Patch Compile Tests _
0 mvndep 16 Maven dependency ordering for patch
+1 mvninstall 426 the patch passed
+1 compile 252 the patch passed
+1 javac 252 the patch passed
+1 checkstyle 66 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 615 patch has no errors when building and testing our client artifacts.
+1 javadoc 147 the patch passed
+1 findbugs 530 the patch passed
_ Other Tests _
-1 unit 258 hadoop-hdds in the patch failed.
-1 unit 1623 hadoop-ozone in the patch failed.
+1 asflicense 43 The patch does not generate ASF License warnings.
6391
Reason Tests
Failed junit tests hadoop.hdds.scm.container.placement.algorithms.TestSCMContainerPlacementRackAware
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.hdds.scm.pipeline.TestRatisPipelineProvider
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/8/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 2449681256d3 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5bfdf62
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/8/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/8/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/8/testReport/
Max. process+thread count 4881 (vs. ulimit of 5500)
modules C: hadoop-ozone/common hadoop-ozone/ozone-manager U: hadoop-ozone
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/8/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.

Copy link
Contributor

@anuengineer anuengineer left a comment

Choose a reason for hiding this comment

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

Let us chat offline, there are some complicated issues here.


// Or do we need to add this for future safe?

if (hasAnyVolumeLock() || hasAnyBucketLock() || hasAnyUserLock()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a small bug in this line of code. Since we have Prefix and S3Secret locks, we have to check for them here. Otherwise our model is incompletely enforced. I do agree that we currently have no code path which would do something like that; but the enforcer must enforce all rules. Not dependent on people doing the right thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

* @return true if current thread holds user lock, else false
*/
private boolean hasAnyUserLock() {
return myLocks.get().get(USER_LOCK).get() != 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This works , but is very inconsistent ? because we do not call into this call when we take multi-user lock -- ?
and that is because this function does not give the semantics we need for the user locking ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, added a call for hasAnyUserLock() in acquireUserLock() so that if some one is trying to acquire multiple user locks, he will immediately fail with RunTimeException. As said in code comments in acquireUserLock() this is a protection logic, in avoiding users do that.


omMetadataManager.getLock().acquireUserLock(owner);
omMetadataManager.getLock().acquireVolumeLock(volume);
omMetadataManager.getLock().acquireUserLock(owner);
Copy link
Contributor

Choose a reason for hiding this comment

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

If acquireUserLock throws an exception, we can try to release a lock in the finally block that we don't actually hold. You may need nested try catch here, or alternative a boolean flag that is set to true when the user lock is acquired.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is why we checked in finally owner!=null and then only release the lock in finally.

// Release and reacquire lock for now it will not be a problem for now, as
// applyTransaction serializes the operation's.
// TODO: Revisit this logic once HDDS-1672 checks in.
// Release and reacquire lock for now it will not be a problem for now, as
Copy link
Contributor

Choose a reason for hiding this comment

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

Obsolete comment?


// We cannot acquire user lock holding volume lock, so released volume
// lock, and acquiring user and volume lock.
// We cannot acquire user lock holding volume lock, so released volume
Copy link
Contributor

Choose a reason for hiding this comment

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

Obsolete comment?


if (compare < 0) {
manager.lock(OM_USER_PREFIX + newUser);
manager.lock(OM_USER_PREFIX + oldUser);
Copy link
Contributor

Choose a reason for hiding this comment

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

If the second lock call fails then we should release the first lock before returning.

The method should either get both locks or none.

metrics.incNumBucketCreates();
try {
metadataManager.getLock().acquireS3BucketLock(s3BucketName);
metadataManager.getLock().acquireVolumeLock(
Copy link
Contributor

Choose a reason for hiding this comment

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

If getting the volume lock fails, the finally block will still attempt to release it. Same with the S3 bucket lock.

You will either need to use nested try-catch or a boolean flag per lock indicating it was successfully acquired.

Copy link
Contributor

Choose a reason for hiding this comment

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

Many of these bugs around proper releasing on failure have always been in the codebase. However this is a good time to fix them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see the only case for failing is with RunTimeException. So, do we still need the flags?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On a side note: once we use new HA code this will be cleaned up, so not considered much refactoring here.


omMetadataManager.getS3Table().put(bucketName, finalName);
} finally {
omMetadataManager.getLock().releaseS3Lock(bucketName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I didn't get why we removed the acquire/release bucket lock. Is the caller now supposed to get the lock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean s3 bucket lock, as we need to acquire that before creating volume. So, that is acquired in caller in OzoneManager.

@bharatviswa504
Copy link
Contributor Author

Opened #1016

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 31 Docker mode activated.
_ Prechecks _
+1 dupname 1 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 66 Maven dependency ordering for branch
+1 mvninstall 468 trunk passed
+1 compile 264 trunk passed
+1 checkstyle 73 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 870 branch has no errors when building and testing our client artifacts.
+1 javadoc 161 trunk passed
0 spotbugs 311 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 499 trunk passed
_ Patch Compile Tests _
0 mvndep 34 Maven dependency ordering for patch
+1 mvninstall 435 the patch passed
+1 compile 283 the patch passed
+1 javac 283 the patch passed
-0 checkstyle 54 hadoop-ozone: The patch generated 31 new + 0 unchanged - 0 fixed = 31 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 677 patch has no errors when building and testing our client artifacts.
+1 javadoc 156 the patch passed
+1 findbugs 510 the patch passed
_ Other Tests _
+1 unit 242 hadoop-hdds in the patch passed.
-1 unit 1372 hadoop-ozone in the patch failed.
+1 asflicense 36 The patch does not generate ASF License warnings.
6445
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.TestStorageContainerManager
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.hdds.scm.pipeline.TestSCMPipelineManager
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-949/9/artifact/out/Dockerfile
GITHUB PR #949
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 8e8c151f73df 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 4b50981
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-949/9/artifact/out/diff-checkstyle-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-949/9/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-949/9/testReport/
Max. process+thread count 4879 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-ozone/common hadoop-ozone/ozone-manager U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-949/9/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.

shanthoosh added a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
…apache#949)

the references of the scala 2.10 version from the documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants