[
https://issues.apache.org/jira/browse/HDDS-1332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16799800#comment-16799800
]
Arpit Agarwal edited comment on HDDS-1332 at 3/23/19 9:12 PM:
--------------------------------------------------------------
I think the second assertion here in DatanodeStateMachine#isDaemonStopped is
overaggressive:
{code}
return this.executorService.isShutdown()
&& this.getContext().getExecutionCount() == 0
{code}
During shutdown - the start() thread is interrupted by close() and
context.execute will not called, which means that StateContext#isExiting will
not reset the stateExecutionCount to zero. This seems to be okay to me.
I think we should just remove the _this.getContext().getExecutionCount() == 0_
assertion.
[~cheersyang], [~anu], looks like this was introduced by HDFS-11444. Let me
know if you have any thoughts on this.
was (Author: arpitagarwal):
I think the second assertion here in DatanodeStateMachine#isDaemonStopped is
overaggressive:
{code}
return this.executorService.isShutdown()
&& this.getContext().getExecutionCount() == 0
{code}
During shutdown when the start() thread is interrupted during sleep by close(),
context.execute will not called, which means that StateContext#isExiting will
not reset the stateExecutionCount to zero. This seems to be okay to me.
I think we should just remove the _this.getContext().getExecutionCount() == 0_
assertion.
[~cheersyang], [~anu], looks like this was introduced by HDFS-11444. Let me
know if you have any thoughts on this.
> Skip flaky test - testStartStopDatanodeStateMachine
> ---------------------------------------------------
>
> Key: HDDS-1332
> URL: https://issues.apache.org/jira/browse/HDDS-1332
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Reporter: Arpit Agarwal
> Priority: Major
>
> testStartStopDatanodeStateMachine fails frequently in Jenkins. It also seems
> to have a timing issue which may be different from the Jenkins failure.
> E.g. If I add a 10 second sleep as below I can get the test to fail 100%.
> {code}
> @@ -163,6 +163,7 @@ public void testStartStopDatanodeStateMachine() throws
> IOException,
> try (DatanodeStateMachine stateMachine =
> new DatanodeStateMachine(getNewDatanodeDetails(), conf, null)) {
> stateMachine.startDaemon();
> + Thread.sleep(10_000L);
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]