Skip to content

HDDS-1620. Implement Volume Write Requests to use Cache and DoubleBuffer. #884

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 15 commits into from
Jun 13, 2019

Conversation

bharatviswa504
Copy link
Contributor

@bharatviswa504 bharatviswa504 commented Jun 1, 2019

Implement Volume write requests to use OM Cache, double buffer.

In this Jira will add the changes to implement volume operations, and HA/Non-HA will have a different code path, but once all requests are implemented will have a single code path.

@hadoop-yetus

This comment has been minimized.

@bharatviswa504 bharatviswa504 self-assigned this Jun 4, 2019
@bharatviswa504 bharatviswa504 changed the title volume requests inprogress HDDS-1620. Implement Volume Write Requests to use Cache and DoubleBuffer. Jun 4, 2019
@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@bharatviswa504
Copy link
Contributor Author

Rebased with the trunk, and added audit logging to volume requests. (HDDS-1600 got checked in, we can add audit log for HA requests)

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@bharatviswa504
Copy link
Contributor Author

/retest

Copy link
Contributor

@hanishakoneru hanishakoneru left a comment

Choose a reason for hiding this comment

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

Thank you @bharatviswa504 for working on this.
I have not finished reviewing yet. Test classes are pending. But posting the comments I have so far.

@bharatviswa504
Copy link
Contributor Author

Thank You @hanishakoneru for the review.
I have addressed review comments.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 71 Docker mode activated.
_ Prechecks _
+1 dupname 2 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 20 Maven dependency ordering for branch
+1 mvninstall 488 trunk passed
+1 compile 278 trunk passed
+1 checkstyle 80 trunk passed
+1 mvnsite 1 trunk passed
+1 shadedclient 891 branch has no errors when building and testing our client artifacts.
+1 javadoc 167 trunk passed
0 spotbugs 324 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 507 trunk passed
-0 patch 379 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 28 Maven dependency ordering for patch
+1 mvninstall 447 the patch passed
+1 compile 281 the patch passed
+1 cc 281 the patch passed
-1 javac 187 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
-0 checkstyle 42 hadoop-ozone: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 2 The patch has no ill-formed XML file.
+1 shadedclient 739 patch has no errors when building and testing our client artifacts.
+1 javadoc 222 the patch passed
+1 findbugs 626 the patch passed
_ Other Tests _
-1 unit 222 hadoop-hdds in the patch failed.
-1 unit 1857 hadoop-ozone in the patch failed.
+1 asflicense 52 The patch does not generate ASF License warnings.
7261
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.TestMiniOzoneCluster
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestBCSID
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.hdds.scm.pipeline.TestRatisPipelineProvider
hadoop.ozone.client.rpc.TestFailureHandlingByClient
hadoop.hdds.scm.pipeline.TestPipelineClose
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestCommitWatcher
Subsystem Report/Notes
Docker Client=18.09.5 Server=18.09.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/16/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 06670fd8251a 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 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
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/16/artifact/out/diff-compile-javac-hadoop-ozone.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-884/16/artifact/out/diff-checkstyle-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/16/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/16/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/16/testReport/
Max. process+thread count 4296 (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-884/16/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.


OmVolumeArgs omVolumeArgs = null;
try {
omVolumeArgs = getVolumeInfo(omMetadataManager, volume);
Copy link
Contributor

Choose a reason for hiding this comment

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

But then why do we need to get the first volume lock? It is a read operation only.

@bharatviswa504
Copy link
Contributor Author

But then why do we need to get the first volume lock? It is a read operation only.

So that this does not get modified during ownerName read.

protected void setUpdatedOmRequest(OMRequest updatedOMRequest) {
Preconditions.checkNotNull(updatedOMRequest);
this.omRequest = updatedOMRequest;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We are not updating omRequest in OmClientRequest anymore?

Copy link
Contributor Author

@bharatviswa504 bharatviswa504 Jun 12, 2019

Choose a reason for hiding this comment

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

Yes that is the reason i removed this method. this is done based on the above comment execute one. Will revisit during merge HA/Non-HA code.

return getOmRequest().toBuilder().setUserInfo(getUserInfo())
.setCreateBucketRequest(newCreateBucketRequest.build()).build();
.setCreateBucketRequest(newCreateBucketRequest.build()).build();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We are not setting the new omRequest in OMClientRequest anymore?

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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 44 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 59 Maven dependency ordering for branch
+1 mvninstall 511 trunk passed
+1 compile 287 trunk passed
+1 checkstyle 80 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 960 branch has no errors when building and testing our client artifacts.
+1 javadoc 177 trunk passed
0 spotbugs 361 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 577 trunk passed
-0 patch 413 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 32 Maven dependency ordering for patch
+1 mvninstall 485 the patch passed
+1 compile 327 the patch passed
+1 cc 327 the patch passed
-1 javac 218 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
-0 checkstyle 45 hadoop-ozone: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 721 patch has no errors when building and testing our client artifacts.
+1 javadoc 173 the patch passed
+1 findbugs 583 the patch passed
_ Other Tests _
-1 unit 165 hadoop-hdds in the patch failed.
-1 unit 1645 hadoop-ozone in the patch failed.
+1 asflicense 53 The patch does not generate ASF License warnings.
7134
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.client.rpc.TestBCSID
hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestReadRetries
hadoop.hdds.scm.pipeline.TestSCMRestart
hadoop.ozone.container.ozoneimpl.TestOzoneContainer
hadoop.ozone.client.rpc.TestOzoneRpcClient
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/17/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 3d45043824b1 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 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
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/17/artifact/out/diff-compile-javac-hadoop-ozone.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-884/17/artifact/out/diff-checkstyle-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/17/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/17/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/17/testReport/
Max. process+thread count 5309 (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-884/17/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 42 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 83 Maven dependency ordering for branch
+1 mvninstall 562 trunk passed
+1 compile 294 trunk passed
+1 checkstyle 85 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 925 branch has no errors when building and testing our client artifacts.
+1 javadoc 174 trunk passed
0 spotbugs 345 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 538 trunk passed
-0 patch 404 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 30 Maven dependency ordering for patch
-1 mvninstall 148 hadoop-ozone in the patch failed.
-1 compile 56 hadoop-ozone in the patch failed.
-1 cc 56 hadoop-ozone in the patch failed.
-1 javac 56 hadoop-ozone in the patch failed.
+1 checkstyle 78 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 2 The patch has no ill-formed XML file.
+1 shadedclient 712 patch has no errors when building and testing our client artifacts.
+1 javadoc 161 the patch passed
-1 findbugs 107 hadoop-ozone in the patch failed.
_ Other Tests _
-1 unit 178 hadoop-hdds in the patch failed.
-1 unit 118 hadoop-ozone in the patch failed.
+1 asflicense 41 The patch does not generate ASF License warnings.
4913
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 8cb18aedf10c 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 / 4ea6c2f
Default Java 1.8.0_212
mvninstall https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-mvninstall-hadoop-ozone.txt
compile https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-compile-hadoop-ozone.txt
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-compile-hadoop-ozone.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-compile-hadoop-ozone.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-findbugs-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/19/testReport/
Max. process+thread count 332 (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-884/19/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 71 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 56 Maven dependency ordering for branch
+1 mvninstall 475 trunk passed
+1 compile 273 trunk passed
+1 checkstyle 79 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 896 branch has no errors when building and testing our client artifacts.
+1 javadoc 166 trunk passed
0 spotbugs 330 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 513 trunk passed
-0 patch 385 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 29 Maven dependency ordering for patch
+1 mvninstall 443 the patch passed
+1 compile 280 the patch passed
+1 cc 280 the patch passed
-1 javac 184 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
+1 checkstyle 83 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 732 patch has no errors when building and testing our client artifacts.
+1 javadoc 170 the patch passed
-1 findbugs 115 hadoop-ozone in the patch failed.
_ Other Tests _
-1 unit 182 hadoop-hdds in the patch failed.
-1 unit 114 hadoop-ozone in the patch failed.
+1 asflicense 37 The patch does not generate ASF License warnings.
5114
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
Subsystem Report/Notes
Docker Client=18.09.5 Server=18.09.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/20/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 44a9d0c11fc0 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 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
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/20/artifact/out/diff-compile-javac-hadoop-ozone.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-884/20/artifact/out/patch-findbugs-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/20/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/20/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/20/testReport/
Max. process+thread count 352 (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-884/20/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.

@@ -451,6 +456,21 @@ private boolean startsWith(byte[] firstArray, byte[] secondArray) {
public boolean isVolumeEmpty(String volume) throws IOException {
String volumePrefix = getVolumeKey(volume + OM_KEY_PREFIX);

if (bucketTable instanceof TypedTable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

When will this check be false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When bucketTable is not an instance of TypedTable. As only TypedTables have Cache.
This is more like a safer check, in a case in future if someone changes the bucketTable to RDBTable, we don't need to do the logic inside this if check. Because cacheIterator throws NotImplementedException for RDBTable.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is more like a safer check, in a case in future if someone changes the bucketTable to RDBTable

But that will change all of our assumptions about how HA requests work correct? Perhaps it is safer if we fail it rather than ignore it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, will update it

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 46 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 25 Maven dependency ordering for branch
+1 mvninstall 508 trunk passed
+1 compile 300 trunk passed
+1 checkstyle 83 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 961 branch has no errors when building and testing our client artifacts.
+1 javadoc 178 trunk passed
0 spotbugs 377 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 598 trunk passed
-0 patch 429 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 30 Maven dependency ordering for patch
+1 mvninstall 470 the patch passed
+1 compile 311 the patch passed
+1 cc 311 the patch passed
-1 javac 209 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
+1 checkstyle 82 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 760 patch has no errors when building and testing our client artifacts.
+1 javadoc 196 the patch passed
+1 findbugs 630 the patch passed
_ Other Tests _
-1 unit 176 hadoop-hdds in the patch failed.
-1 unit 1890 hadoop-ozone in the patch failed.
+1 asflicense 51 The patch does not generate ASF License warnings.
7461
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.client.rpc.TestBCSID
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.scm.pipeline.TestSCMPipelineMetrics
hadoop.ozone.client.rpc.TestOzoneRpcClient
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/18/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux d64606d540e7 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 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
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/18/artifact/out/diff-compile-javac-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/18/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/18/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/18/testReport/
Max. process+thread count 4102 (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-884/18/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.

omMetadataManager.getLock().releaseVolumeLock(volume);
}

// 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.

This looks risky. Can the state of the world change between releasing the lock and reacquiring it?

Also I am thinking why do we need the user lock in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From my understanding user-lock is for protecting userTable, where we maintain list of volumes for that particular user.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about the release/reacquire issue? Same issue exists in OMVolumeSetOwnerRequest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Example:
SetOwner Volume - V1 , old Owner ozone, newOwner hadoop
CreateVolume Volume -v7 owner-ozone

If we don't acquire the lock for oldOwner before reading from the table. We might see an issue.

This is to protect above kind of scenario

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And holding lock for the user is to protect volumeList which we store for the user.

Copy link
Contributor

@arp7 arp7 Jun 12, 2019

Choose a reason for hiding this comment

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

Bharat - let's discuss. What I mean is that release/reacquire pattern is usually a bad idea. It may be okay here, however it would be better to eliminate it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay..

@@ -451,6 +456,21 @@ private boolean startsWith(byte[] firstArray, byte[] secondArray) {
public boolean isVolumeEmpty(String volume) throws IOException {
String volumePrefix = getVolumeKey(volume + OM_KEY_PREFIX);

if (bucketTable instanceof TypedTable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more like a safer check, in a case in future if someone changes the bucketTable to RDBTable

But that will change all of our assumptions about how HA requests work correct? Perhaps it is safer if we fail it rather than ignore it.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 45 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 24 Maven dependency ordering for branch
+1 mvninstall 546 trunk passed
+1 compile 313 trunk passed
+1 checkstyle 83 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 959 branch has no errors when building and testing our client artifacts.
+1 javadoc 178 trunk passed
0 spotbugs 394 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 630 trunk passed
-0 patch 447 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 31 Maven dependency ordering for patch
+1 mvninstall 497 the patch passed
+1 compile 313 the patch passed
+1 cc 313 the patch passed
-1 javac 205 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
+1 checkstyle 86 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 728 patch has no errors when building and testing our client artifacts.
+1 javadoc 184 the patch passed
+1 findbugs 643 the patch passed
_ Other Tests _
-1 unit 189 hadoop-hdds in the patch failed.
-1 unit 1218 hadoop-ozone in the patch failed.
+1 asflicense 52 The patch does not generate ASF License warnings.
6895
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.client.rpc.TestBCSID
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-884/22/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 480ce8523beb 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 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
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/22/artifact/out/diff-compile-javac-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/22/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/22/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/22/testReport/
Max. process+thread count 2363 (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-884/22/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 48 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 21 Maven dependency ordering for branch
+1 mvninstall 549 trunk passed
+1 compile 311 trunk passed
+1 checkstyle 80 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 938 branch has no errors when building and testing our client artifacts.
+1 javadoc 174 trunk passed
0 spotbugs 402 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 634 trunk passed
-0 patch 453 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 31 Maven dependency ordering for patch
+1 mvninstall 502 the patch passed
+1 compile 315 the patch passed
+1 cc 315 the patch passed
-1 javac 214 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
+1 checkstyle 88 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 722 patch has no errors when building and testing our client artifacts.
+1 javadoc 175 the patch passed
+1 findbugs 648 the patch passed
_ Other Tests _
-1 unit 184 hadoop-hdds in the patch failed.
-1 unit 2182 hadoop-ozone in the patch failed.
+1 asflicense 50 The patch does not generate ASF License warnings.
7827
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.container.ozoneimpl.TestOzoneContainer
hadoop.ozone.om.TestScmSafeMode
hadoop.ozone.ozShell.TestOzoneShell
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.hdds.scm.pipeline.TestRatisPipelineProvider
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestReadRetries
hadoop.ozone.client.rpc.TestHybridPipelineOnDatanode
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/21/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 1140e97014fd 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 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
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/21/artifact/out/diff-compile-javac-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/21/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/21/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/21/testReport/
Max. process+thread count 4141 (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-884/21/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

Thank You @arp7 for the review.
Addressed the review comments and also updated to add comments based on our offline discussion.

Copy link
Contributor

@arp7 arp7 left a comment

Choose a reason for hiding this comment

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

+1 pending CI.

@bharatviswa504
Copy link
Contributor Author

/retest

@hanishakoneru
Copy link
Contributor

Thank you @bharatviswa504 for working on this.
+1 pending CI.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 130 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 12 new or modified test files.
_ trunk Compile Tests _
0 mvndep 41 Maven dependency ordering for branch
+1 mvninstall 663 trunk passed
+1 compile 334 trunk passed
+1 checkstyle 104 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 1131 branch has no errors when building and testing our client artifacts.
+1 javadoc 206 trunk passed
0 spotbugs 407 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 641 trunk passed
-0 patch 487 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 38 Maven dependency ordering for patch
+1 mvninstall 563 the patch passed
+1 compile 369 the patch passed
+1 cc 369 the patch passed
-1 javac 248 hadoop-ozone generated 4 new + 3 unchanged - 0 fixed = 7 total (was 3)
+1 checkstyle 115 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 1 The patch has no ill-formed XML file.
+1 shadedclient 854 patch has no errors when building and testing our client artifacts.
+1 javadoc 215 the patch passed
+1 findbugs 649 the patch passed
_ Other Tests _
-1 unit 229 hadoop-hdds in the patch failed.
-1 unit 2076 hadoop-ozone in the patch failed.
+1 asflicense 72 The patch does not generate ASF License warnings.
8676
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
hadoop.ozone.container.ozoneimpl.TestOzoneContainer
hadoop.ozone.client.rpc.TestReadRetries
hadoop.ozone.client.rpc.TestCloseContainerHandlingByClient
hadoop.ozone.TestMiniOzoneCluster
hadoop.ozone.container.common.impl.TestContainerPersistence
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestBCSID
Subsystem Report/Notes
Docker Client=18.09.5 Server=18.09.5 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-884/23/artifact/out/Dockerfile
GITHUB PR #884
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc xml
uname Linux 38467789fdca 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 1732312
Default Java 1.8.0_212
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-884/23/artifact/out/diff-compile-javac-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/23/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-884/23/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-884/23/testReport/
Max. process+thread count 3513 (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-884/23/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

Test PartialTableCache is passing locally.
Screen Shot 2019-06-12 at 5 43 43 PM

@bharatviswa504
Copy link
Contributor Author

Thank You @hanishakoneru and @arp7 for the review.
I will commit this to trunk.

@bharatviswa504 bharatviswa504 merged commit 88c53d5 into apache:trunk Jun 13, 2019
bshashikant pushed a commit to bshashikant/hadoop that referenced this pull request Jul 10, 2019
shanthoosh added a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
…zaContainer.

SAMZA-1489 added support for committing the offsets of all the  tasks when shutting down a SamzaContainer. Other components in samza such as a CheckpointListener's  aren't developed to account for possibility of commit after the consumers are stopped.

This  unnecessarily results in a unclean shutdown of a samza standalone processor during the rebalancing phase. Here're the sample logs:
```
apache.samza.container.SamzaContainer129d533c to shutdown.
2019/01/15 02:38:09.738 INFO [SamzaContainer] [Samza StreamProcessor Container Thread-0] [hello-brooklin-task] [] Shutting down SamzaContainer.
2019/01/15 02:38:09.738 INFO [SamzaContainer] [Samza StreamProcessor Container Thread-0] [hello-brooklin-task] [] Shutting down consumer multiplexer.
2019/01/15 02:38:09.741 INFO [KafkaProducer] [hello-brooklin-task-i001-auditor] [hello-brooklin-task] [] [Producer clientId=hello-brooklin-task-i001-auditor, transactionalId=nullClosing the Kafka producer with timeoutMillis = 9223370489334886066 ms.
2019/01/15 02:38:09.748 INFO [SamzaContainer] [Samza StreamProcessor Container Thread-0] [hello-brooklin-task] [] Shutting down task instance stream tasks.
2019/01/15 02:38:09.748 INFO [SamzaContainer] [Samza StreamProcessor Container Thread-0] [hello-brooklin-task] [] Shutting down timer executor
2019/01/15 02:38:09.749 INFO [SamzaContainer] [Samza StreamProcessor Container Thread-0] [hello-brooklin-task] [] Committing offsets for all task instances
2019/01/15 02:38:09.753 ERROR [SamzaContainer] [Samza StreamProcessor Container Thread-0] [hello-brooklin-task] [] Caught exception/error while shutting down container.
java.lang.IllegalStateException: This consumer has already been closed.
 at org.apache.kafka.clients.consumer.KafkaConsumer.acquireAndEnsureOpen(KafkaConsumer.java:1735)
 at org.apache.kafka.clients.consumer.KafkaConsumer.commitSync(KafkaConsumer.java:1214)
 at com.linkedin.kafka.liclients.consumer.LiKafkaConsumerImpl.commitOffsets(LiKafkaConsumerImpl.java:311)
 at com.linkedin.kafka.liclients.consumer.LiKafkaConsumerImpl.commitSync(LiKafkaConsumerImpl.java:282)
 at com.linkedin.brooklin.client.BaseConsumerImpl.commit(BaseConsumerImpl.java:136)
```

Since the final commit is not critical, it will be better to not do it as a part of the SamzaContainer shutdown sequence.

Author: Shanthoosh Venkataraman <spvenkat@usc.edu>

Reviewers: Prateek Maheshwari <pmaheshwari@apache.org>

Closes apache#884 from shanthoosh/remove_task_commit_during_shutdown
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