Skip to content

Conversation

lokeshj1703
Copy link
Contributor

Datanode should sync db when container is moved to CLOSED or QUASI_CLOSED state. This will ensure that the metadata of a container is persisted.

@lokeshj1703
Copy link
Contributor Author

@supratimdeka Can you please review the PR?

@lokeshj1703 lokeshj1703 self-assigned this Aug 20, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 43 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 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 13 Maven dependency ordering for branch
+1 mvninstall 613 trunk passed
+1 compile 368 trunk passed
+1 checkstyle 63 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 857 branch has no errors when building and testing our client artifacts.
+1 javadoc 163 trunk passed
0 spotbugs 467 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 680 trunk passed
_ Patch Compile Tests _
0 mvndep 17 Maven dependency ordering for patch
+1 mvninstall 588 the patch passed
+1 compile 380 the patch passed
+1 cc 380 the patch passed
+1 javac 380 the patch passed
+1 checkstyle 73 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 627 patch has no errors when building and testing our client artifacts.
+1 javadoc 154 the patch passed
+1 findbugs 712 the patch passed
_ Other Tests _
-1 unit 179 hadoop-hdds in the patch failed.
-1 unit 156 hadoop-ozone in the patch failed.
+1 asflicense 31 The patch does not generate ASF License warnings.
5880
Reason Tests
Failed junit tests hadoop.ozone.container.keyvalue.TestKeyValueContainerCheck
hadoop.ozone.container.keyvalue.TestKeyValueContainerMarkUnhealthy
hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithOMResponse
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/1/artifact/out/Dockerfile
GITHUB PR #1319
JIRA Issue HDDS-1981
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc
uname Linux ba9a1d6dcbd5 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 / 6244502
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/1/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/1/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/1/testReport/
Max. process+thread count 542 (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-1319/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.

// Close container is not expected to be instantaneous.
compactDB();
// We must sync the DB after close operation
flushAndSyncDB();
Copy link
Contributor

Choose a reason for hiding this comment

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

updateContainerData takes care to revert the state of the container in case of failure.
Won't that be a problem with flushDB? If flush fails, don't we want the container to remain Open?
Also, related question : what should be the relative order - sync first and then change state to close, both with the writeLock held

Same question applies to quasiClose as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The recent commit moves sync before state change. Any failure in flush should now move to container to UNHEALTHY state in HddsDispatcher#dispatchRequest.


// It is ok if this operation takes a bit of time.
// Close container is not expected to be instantaneous.
compactDB();
Copy link
Contributor

Choose a reason for hiding this comment

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

question unrelated to this patch : why do we need to run compact during close? what is the benefit?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. I feel we don't have to run compactDB in quasi close or close.

@bshashikant
Copy link
Contributor

Thanks @lokeshj1703 for working on this. I think running explicit compaction before close might make it heavy operation. Can we run compaction in the background or in a separate thread after closing the container?

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 40 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 12 Maven dependency ordering for branch
+1 mvninstall 572 trunk passed
+1 compile 341 trunk passed
+1 checkstyle 64 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 795 branch has no errors when building and testing our client artifacts.
+1 javadoc 153 trunk passed
0 spotbugs 198 Used deprecated FindBugs config; considering switching to SpotBugs.
-1 findbugs 365 hadoop-ozone in trunk failed.
_ Patch Compile Tests _
0 mvndep 17 Maven dependency ordering for patch
+1 mvninstall 534 the patch passed
+1 compile 347 the patch passed
+1 cc 347 the patch passed
+1 javac 347 the patch passed
+1 checkstyle 64 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 627 patch has no errors when building and testing our client artifacts.
+1 javadoc 67 hadoop-hdds generated 0 new + 16 unchanged - 4 fixed = 16 total (was 20)
+1 javadoc 85 hadoop-ozone in the patch passed.
+1 findbugs 641 the patch passed
_ Other Tests _
-1 unit 197 hadoop-hdds in the patch failed.
-1 unit 1846 hadoop-ozone in the patch failed.
+1 asflicense 41 The patch does not generate ASF License warnings.
7135
Reason Tests
Failed junit tests hadoop.ozone.container.keyvalue.TestKeyValueContainerCheck
hadoop.ozone.container.keyvalue.TestKeyValueContainerMarkUnhealthy
hadoop.ozone.container.server.TestSecureContainerServer
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/2/artifact/out/Dockerfile
GITHUB PR #1319
JIRA Issue HDDS-1981
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc
uname Linux fc6e2845b7cb 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 / ee7c261
Default Java 1.8.0_222
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/2/artifact/out/branch-findbugs-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/2/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/2/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/2/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-1319/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.

@lokeshj1703
Copy link
Contributor Author

lokeshj1703 commented Aug 22, 2019

@supratimdeka @bshashikant Thanks for reviewing the PR! I have pushed a commit addressing your comments.
@bshashikant Can we address the compaction issue in another jira?

@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 appears to include 1 new or modified test files.
_ trunk Compile Tests _
0 mvndep 21 Maven dependency ordering for branch
+1 mvninstall 623 trunk passed
+1 compile 387 trunk passed
+1 checkstyle 69 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 859 branch has no errors when building and testing our client artifacts.
+1 javadoc 167 trunk passed
0 spotbugs 469 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 693 trunk passed
_ Patch Compile Tests _
0 mvndep 19 Maven dependency ordering for patch
+1 mvninstall 588 the patch passed
+1 compile 386 the patch passed
+1 cc 386 the patch passed
+1 javac 386 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 668 patch has no errors when building and testing our client artifacts.
+1 javadoc 167 the patch passed
+1 findbugs 662 the patch passed
_ Other Tests _
+1 unit 288 hadoop-hdds in the patch passed.
-1 unit 1732 hadoop-ozone in the patch failed.
+1 asflicense 40 The patch does not generate ASF License warnings.
7620
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException
hadoop.ozone.container.server.TestSecureContainerServer
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/3/artifact/out/Dockerfile
GITHUB PR #1319
JIRA Issue HDDS-1981
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc
uname Linux fc838a56b131 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 / 28fb4b5
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/3/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/3/testReport/
Max. process+thread count 5333 (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-1319/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 68 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 10 Maven dependency ordering for branch
+1 mvninstall 562 trunk passed
+1 compile 355 trunk passed
+1 checkstyle 61 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 823 branch has no errors when building and testing our client artifacts.
+1 javadoc 160 trunk passed
0 spotbugs 443 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 649 trunk passed
_ Patch Compile Tests _
0 mvndep 32 Maven dependency ordering for patch
+1 mvninstall 567 the patch passed
+1 compile 369 the patch passed
+1 cc 369 the patch passed
+1 javac 369 the patch passed
+1 checkstyle 69 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 658 patch has no errors when building and testing our client artifacts.
+1 javadoc 151 the patch passed
+1 findbugs 659 the patch passed
_ Other Tests _
-1 unit 361 hadoop-hdds in the patch failed.
-1 unit 4692 hadoop-ozone in the patch failed.
+1 asflicense 37 The patch does not generate ASF License warnings.
10436
Reason Tests
Failed junit tests hadoop.hdds.scm.block.TestBlockManager
hadoop.ozone.container.server.TestSecureContainerServer
hadoop.ozone.web.client.TestBuckets
hadoop.hdds.scm.pipeline.TestRatisPipelineCreateAndDestory
hadoop.ozone.client.rpc.TestBCSID
hadoop.ozone.client.rpc.TestOzoneRpcClientForAclAuditLog
hadoop.ozone.scm.TestXceiverClientMetrics
hadoop.hdds.scm.pipeline.TestSCMPipelineManager
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/4/artifact/out/Dockerfile
GITHUB PR #1319
JIRA Issue HDDS-1981
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc
uname Linux 9950c23d599a 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 / 28fb4b5
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/4/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/4/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/4/testReport/
Max. process+thread count 4882 (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-1319/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.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 44 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 131 Maven dependency ordering for branch
+1 mvninstall 710 trunk passed
+1 compile 404 trunk passed
+1 checkstyle 82 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 977 branch has no errors when building and testing our client artifacts.
+1 javadoc 173 trunk passed
0 spotbugs 486 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 697 trunk passed
_ Patch Compile Tests _
0 mvndep 26 Maven dependency ordering for patch
+1 mvninstall 609 the patch passed
+1 compile 386 the patch passed
+1 cc 386 the patch passed
+1 javac 386 the patch passed
+1 checkstyle 84 the patch passed
+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 171 the patch passed
+1 findbugs 640 the patch passed
_ Other Tests _
+1 unit 310 hadoop-hdds in the patch passed.
-1 unit 1970 hadoop-ozone in the patch failed.
+1 asflicense 55 The patch does not generate ASF License warnings.
8316
Reason Tests
Failed junit tests hadoop.ozone.container.common.statemachine.commandhandler.TestBlockDeletion
hadoop.ozone.client.rpc.TestContainerStateMachineFailures
hadoop.ozone.client.rpc.TestBlockOutputStreamWithFailures
hadoop.ozone.container.server.TestSecureContainerServer
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/5/artifact/out/Dockerfile
GITHUB PR #1319
JIRA Issue HDDS-1981
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle cc
uname Linux a9241bd1bc80 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 23e532d
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/5/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1319/5/testReport/
Max. process+thread count 4947 (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-1319/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

Thanks @lokeshj1703 for updating the patch . The patch looks good to me. I am +1 on this change.

@lokeshj1703 lokeshj1703 merged commit 4379370 into apache:trunk Aug 27, 2019
@lokeshj1703
Copy link
Contributor Author

@bshashikant @supratimdeka @nandakumar131 Thanks for reviewing the PR. I have merged it with trunk.

@lokeshj1703 lokeshj1703 deleted the HDDS-1981 branch August 27, 2019 04:53
amahussein pushed a commit to amahussein/hadoop that referenced this pull request Oct 29, 2019
RogPodge pushed a commit to RogPodge/hadoop that referenced this pull request Mar 25, 2020
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.

5 participants