You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2019/11/08 19:38:00 UTC

[jira] [Created] (HDDS-2452) Wrong condition for re-scheduling in ReportPublisher

Attila Doroszlai created HDDS-2452:
--------------------------------------

             Summary: Wrong condition for re-scheduling in ReportPublisher
                 Key: HDDS-2452
                 URL: https://issues.apache.org/jira/browse/HDDS-2452
             Project: Hadoop Distributed Data Store
          Issue Type: Bug
          Components: Ozone Datanode
            Reporter: Attila Doroszlai


It seems the condition for scheduling next run of {{ReportPublisher}} is wrong:

{code:title=https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/report/ReportPublisher.java#L74-L76}
    if (!executor.isShutdown() ||
        !(context.getState() == DatanodeStates.SHUTDOWN)) {
      executor.schedule(this,
{code}

Given the condition above, the task may be scheduled again if the executor is shutdown, but the state machine is not set to shutdown (or vice versa).  (Currently it is unlikely to happen, since [context state is set to shutdown before the report executor|https://github.com/apache/hadoop-ozone/blob/f928a0bdb4ea2e5195da39256c6dda9f1c855649/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java#L392-L393].)

[~nanda], can you please confirm if this is a typo or intentional?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org