Skip to content
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

HDDS-1816: ContainerStateMachine should limit number of pending apply transactions #1150

Merged
merged 1 commit into from Jul 31, 2019

Conversation

lokeshj1703
Copy link
Contributor

ContainerStateMachine should limit number of pending apply transactions in order to avoid excessive heap usage by the pending transactions.

@lokeshj1703 lokeshj1703 self-assigned this Jul 24, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 36 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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 25 Maven dependency ordering for branch
+1 mvninstall 579 trunk passed
+1 compile 355 trunk passed
+1 checkstyle 65 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 784 branch has no errors when building and testing our client artifacts.
+1 javadoc 142 trunk passed
0 spotbugs 413 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 605 trunk passed
_ Patch Compile Tests _
0 mvndep 17 Maven dependency ordering for patch
+1 mvninstall 551 the patch passed
+1 compile 366 the patch passed
+1 javac 366 the patch passed
-0 checkstyle 37 hadoop-hdds: The patch generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 739 patch has no errors when building and testing our client artifacts.
+1 javadoc 144 the patch passed
+1 findbugs 619 the patch passed
_ Other Tests _
+1 unit 284 hadoop-hdds in the patch passed.
-1 unit 1541 hadoop-ozone in the patch failed.
+1 asflicense 41 The patch does not generate ASF License warnings.
7137
Reason Tests
Failed junit tests hadoop.ozone.om.TestOzoneManagerHA
hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException
hadoop.ozone.client.rpc.TestFailureHandlingByClient
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestCloseContainerHandlingByClient
hadoop.ozone.TestStorageContainerManager
hadoop.ozone.TestOzoneConfigurationFields
hadoop.ozone.client.rpc.TestMultiBlockWritesWithDnFailures
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestBlockOutputStreamWithFailures
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.container.common.statemachine.commandhandler.TestBlockDeletion
Subsystem Report/Notes
Docker Client=19.03.0 Server=19.03.0 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/1/artifact/out/Dockerfile
GITHUB PR #1150
JIRA Issue HDDS-1816
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 2fa951e5a4a6 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 / cf9ff08
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/1/artifact/out/diff-checkstyle-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/1/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/1/testReport/
Max. process+thread count 5292 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-hdds/container-service U: hadoop-hdds
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 41 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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 24 Maven dependency ordering for branch
+1 mvninstall 637 trunk passed
+1 compile 400 trunk passed
+1 checkstyle 69 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 875 branch has no errors when building and testing our client artifacts.
+1 javadoc 160 trunk passed
0 spotbugs 457 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 676 trunk passed
_ Patch Compile Tests _
0 mvndep 23 Maven dependency ordering for patch
+1 mvninstall 611 the patch passed
+1 compile 411 the patch passed
+1 javac 411 the patch passed
-0 checkstyle 36 hadoop-hdds: 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 shadedclient 661 patch has no errors when building and testing our client artifacts.
+1 javadoc 147 the patch passed
+1 findbugs 659 the patch passed
_ Other Tests _
+1 unit 324 hadoop-hdds in the patch passed.
-1 unit 2027 hadoop-ozone in the patch failed.
+1 asflicense 48 The patch does not generate ASF License warnings.
8039
Reason Tests
Failed junit tests hadoop.ozone.TestOzoneConfigurationFields
hadoop.ozone.TestStorageContainerManager
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.TestFailureHandlingByClient
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.hdds.scm.pipeline.TestSCMRestart
hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException
hadoop.ozone.client.rpc.TestCloseContainerHandlingByClient
hadoop.ozone.client.rpc.TestMultiBlockWritesWithDnFailures
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
Subsystem Report/Notes
Docker Client=19.03.0 Server=19.03.0 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/2/artifact/out/Dockerfile
GITHUB PR #1150
JIRA Issue HDDS-1816
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 985262bfb746 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 / cf9ff08
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/2/artifact/out/diff-checkstyle-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/2/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/2/testReport/
Max. process+thread count 4899 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-hdds/container-service U: hadoop-hdds
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/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.

int maxPendingApplyTransactions = conf.getInt(
ScmConfigKeys.DFS_CONTAINER_RATIS_STATEMACHINE_MAX_PENDING_APPLY_TRANSACTIONS,
ScmConfigKeys.DFS_CONTAINER_RATIS_STATEMACHINE_MAX_PENDING_APPLY_TRANSACTIONS_DEFAULT);
applyTransactionSemaphore = new Semaphore(maxPendingApplyTransactions);
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Here do we need fair setting, to follow the order?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bharatviswa504 Thanks for reviewing the changes! We do not need a fair setting as in Ratis StateMachineUpdater the call to applyTransaction is serialized.

@bshashikant
Copy link
Contributor

Thanks @lokeshj1703 for working on this. As discussed offline, let's make the default value of the limit equal to snapshot interval in terms of log transactions as in any case, during restart snapshotIndex will determine how many entries from the log will be pending to be applied.

@lokeshj1703
Copy link
Contributor Author

@bshashikant Thanks for reviewing the PR! I have pushed commit addressing the comment.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 45 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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 23 Maven dependency ordering for branch
+1 mvninstall 667 trunk passed
+1 compile 375 trunk passed
+1 checkstyle 64 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 843 branch has no errors when building and testing our client artifacts.
+1 javadoc 155 trunk passed
0 spotbugs 425 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 621 trunk passed
_ Patch Compile Tests _
0 mvndep 21 Maven dependency ordering for patch
+1 mvninstall 564 the patch passed
+1 compile 364 the patch passed
+1 javac 364 the patch passed
-0 checkstyle 30 hadoop-hdds: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 1 The patch has no whitespace issues.
+1 shadedclient 642 patch has no errors when building and testing our client artifacts.
+1 javadoc 158 the patch passed
+1 findbugs 638 the patch passed
_ Other Tests _
-1 unit 297 hadoop-hdds in the patch failed.
-1 unit 1668 hadoop-ozone in the patch failed.
+1 asflicense 50 The patch does not generate ASF License warnings.
7402
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.TestOzoneConfigurationFields
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.client.rpc.Test2WayCommitInRatis
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.client.rpc.TestSecureOzoneRpcClient
hadoop.ozone.client.rpc.TestMultiBlockWritesWithDnFailures
hadoop.ozone.om.TestScmSafeMode
hadoop.ozone.client.rpc.TestBlockOutputStreamWithFailures
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/3/artifact/out/Dockerfile
GITHUB PR #1150
JIRA Issue HDDS-1816
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux a26bfb072004 4.4.0-157-generic #185-Ubuntu SMP Tue Jul 23 09:17:01 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / aebac6d
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/3/artifact/out/diff-checkstyle-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/3/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/3/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/3/testReport/
Max. process+thread count 5340 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-hdds/container-service U: hadoop-hdds
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/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 63 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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 10 Maven dependency ordering for branch
+1 mvninstall 648 trunk passed
+1 compile 376 trunk passed
+1 checkstyle 73 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 824 branch has no errors when building and testing our client artifacts.
+1 javadoc 156 trunk passed
0 spotbugs 431 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 627 trunk passed
_ Patch Compile Tests _
0 mvndep 18 Maven dependency ordering for patch
+1 mvninstall 594 the patch passed
+1 compile 383 the patch passed
+1 javac 383 the patch passed
+1 checkstyle 71 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 651 patch has no errors when building and testing our client artifacts.
+1 javadoc 150 the patch passed
+1 findbugs 664 the patch passed
_ Other Tests _
-1 unit 378 hadoop-hdds in the patch failed.
-1 unit 323 hadoop-ozone in the patch failed.
+1 asflicense 38 The patch does not generate ASF License warnings.
6195
Reason Tests
Failed junit tests hadoop.ozone.security.TestOzoneDelegationTokenSecretManager
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/4/artifact/out/Dockerfile
GITHUB PR #1150
JIRA Issue HDDS-1816
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 482d16b8f3c6 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 / 62efb63
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/4/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/4/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/4/testReport/
Max. process+thread count 1352 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-hdds/container-service U: hadoop-hdds
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/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.

… transactions. Adds a config, uses snapshot threshold default value.
@lokeshj1703
Copy link
Contributor Author

Latest commit brings back the config for maximum number of pending apply transactions, uses snapshot threshold default value as default value for the config.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 136 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 doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 47 Maven dependency ordering for branch
+1 mvninstall 755 trunk passed
+1 compile 418 trunk passed
+1 checkstyle 88 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 1111 branch has no errors when building and testing our client artifacts.
+1 javadoc 207 trunk passed
0 spotbugs 532 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 785 trunk passed
_ Patch Compile Tests _
0 mvndep 25 Maven dependency ordering for patch
+1 mvninstall 656 the patch passed
+1 compile 437 the patch passed
+1 javac 437 the patch passed
-0 checkstyle 45 hadoop-hdds: 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 xml 2 The patch has no ill-formed XML file.
+1 shadedclient 838 patch has no errors when building and testing our client artifacts.
+1 javadoc 199 the patch passed
+1 findbugs 763 the patch passed
_ Other Tests _
-1 unit 381 hadoop-hdds in the patch failed.
-1 unit 272 hadoop-ozone in the patch failed.
+1 asflicense 52 The patch does not generate ASF License warnings.
7480
Reason Tests
Failed junit tests hadoop.ozone.om.response.s3.multipart.TestS3MultipartUploadAbortResponse
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/5/artifact/out/Dockerfile
GITHUB PR #1150
JIRA Issue HDDS-1816
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml
uname Linux e1fce682737d 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 / 61ec03c
Default Java 1.8.0_212
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/5/artifact/out/diff-checkstyle-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/5/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/5/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/5/testReport/
Max. process+thread count 1202 (vs. ulimit of 5500)
modules C: hadoop-hdds/common hadoop-hdds/container-service U: hadoop-hdds
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1150/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.

@bshashikant
Copy link
Contributor

The patch looks good to me . +1 .

@bshashikant bshashikant reopened this Jul 31, 2019
@bshashikant bshashikant merged commit d4ab9ae into apache:trunk Jul 31, 2019
@elek
Copy link
Member

elek commented Jul 31, 2019

Checkstyle seems to be related: https://issues.apache.org/jira/browse/HDDS-1878

shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
…removed (apache#1150)

In the previous PR: https://github.com/apache/samza/pull/1010/files
config with null/empty values will be filter out when reading the coordinator stream,
this will cause some problems when the user expects an empty string to be a value config.
amahussein pushed a commit to amahussein/hadoop that referenced this pull request Oct 29, 2019
… transactions. Adds a config, uses snapshot threshold default value. (apache#1150)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants