[ https://issues.apache.org/jira/browse/HDDS-1475?focusedWorklogId=238698&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-238698 ]
ASF GitHub Bot logged work on HDDS-1475: ---------------------------------------- Author: ASF GitHub Bot Created on: 07/May/19 18:23 Start Date: 07/May/19 18:23 Worklog Time Spent: 10m Work Description: bharatviswa504 commented on pull request #788: HDDS-1475 : Fix OzoneContainer start method. URL: https://github.com/apache/hadoop/pull/788#discussion_r281770846 ########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java ########## @@ -160,8 +160,12 @@ private void startContainerScrub() { LOG.info("Background container scrubber has been disabled by {}", HddsConfigKeys.HDDS_CONTAINERSCRUB_ENABLED); } else { - this.scrubber = new ContainerScrubber(containerSet, config); - scrubber.up(); + if (this.scrubber == null) { + this.scrubber = new ContainerScrubber(containerSet, config); + } + if (this.scrubber.isHalted()) { Review comment: I think we don't need this check here, as scrubber up() is already taking care of multiple starts. public void up() { this.halt = false; if (this.scrubThread == null) { this.scrubThread = new Thread(this); scrubThread.start(); } else { LOG.info("Scrubber up called multiple times. Scrub thread already up."); } } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 238698) Time Spent: 2.5h (was: 2h 20m) > Fix OzoneContainer start method > ------------------------------- > > Key: HDDS-1475 > URL: https://issues.apache.org/jira/browse/HDDS-1475 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Components: Ozone Datanode > Reporter: Bharat Viswanadham > Assignee: Aravindan Vijayan > Priority: Major > Labels: newbie, pull-request-available > Time Spent: 2.5h > Remaining Estimate: 0h > > In OzoneContainer start() we have > {code:java} > startContainerScrub(); > writeChannel.start(); > readChannel.start(); > hddsDispatcher.init(); > hddsDispatcher.setScmId(scmId);{code} > > Suppose here if readChannel.start() failed due to some reason, from > VersionEndPointTask, we try to start OzoneContainer again. This can cause an > issue for writeChannel.start() if it is already started. > > Fix the logic such a way that if service is started, don't attempt to start > the service again. Similar changes needed to be done for stop(). -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org