[
https://issues.apache.org/jira/browse/HDDS-8129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699127#comment-17699127
]
Ethan Rose commented on HDDS-8129:
----------------------------------
This race allows updates to used bytes, block count, and BCSID metadata for
containers to be overwritten during putBlock operations. This means when the
container is closed, block count, used bytes, and BCSID in RocksDB may be lower
than their expected values. See
[{{BlockManagerImpl#persistPutBlock}}|https://github.com/apache/ozone/blob/886fc3d419e07a5736a2112fd748c3b212c2f11f/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/BlockManagerImpl.java#L110].
> ContainerStateMachine allows two different tasks with the same container id
> running in parallel
> -----------------------------------------------------------------------------------------------
>
> Key: HDDS-8129
> URL: https://issues.apache.org/jira/browse/HDDS-8129
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Datanode
> Reporter: Tsz-wo Sze
> Assignee: Tsz-wo Sze
> Priority: Blocker
> Labels: pull-request-available
>
> In the ContainerStateMachine.submitTask(..) method, we can have the following
> case
> # The applyTransaction thread enters submitTask(..). It gets a queue Q for a
> container C from containerTaskQueues, where Q is empty at that time.
> # Right before applyTransaction submits a task T1, the executor has
> completed running a previous task T2 for container C. Since Q is empty, the
> executor removes Q from containerTaskQueues.
> # The applyTransaction thread submits task T1 to Q. It does not aware that
> Q is no longer in containerTaskQueues.
> # Now, the applyTransaction thread submits a new task T3 for container C.
> Since there is no queue for container C in containerTaskQueues, it creates a
> new queue Q2 and submits T3 to Q2.
> As a result, T1 and T3 for container C can run in parallel since there are
> two queues.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]