[ https://issues.apache.org/jira/browse/HDDS-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16841586#comment-16841586 ]
Jitendra Nath Pandey edited comment on HDDS-1517 at 5/16/19 5:56 PM: --------------------------------------------------------------------- The patch moves addition of container to pipelineStateMap after its addition to container cache. Now a thread may first find the container in the cache but not in pipelineStateMap. How is the race condition addressed? Do we guarantee that a thread will always look in a certain order. was (Author: jnp): The patch moves addition of container to pipelineStateMap after its addition to container cache. Now a thread may first find the container in the cache but not in pipelineStateMap. How is the race condition addressed? Do we guarantee that a thread will never look in pipelineStateMap before it looks in container cache? > AllocateBlock call fails with ContainerNotFoundException > -------------------------------------------------------- > > Key: HDDS-1517 > URL: https://issues.apache.org/jira/browse/HDDS-1517 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Components: SCM > Affects Versions: 0.5.0 > Reporter: Shashikant Banerjee > Assignee: Shashikant Banerjee > Priority: Major > Labels: pull-request-available > Fix For: 0.4.1 > > Attachments: HDDS-1517.000.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > In allocateContainer call, the container is first added to pipelineStateMap > and then added to container cache. If two allocate blocks execute > concurrently, it might happen that one find the container to exist in the > pipelineStateMap but the container is yet to be updated in the container > cache, hence failing with CONTAINER_NOT_FOUND exception. -- 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