Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-8129

ContainerStateMachine allows two different tasks with the same container id running in parallel

    XMLWordPrintableJSON

Details

    Description

      In the ContainerStateMachine.submitTask(..) method, we can have the following case

      1. The applyTransaction thread enters submitTask(..). It gets a queue Q for a container C from containerTaskQueues, where Q is empty at that time.
      2. 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.
      3. The applyTransaction thread submits task T1 to Q.  It does not aware that Q is no longer in containerTaskQueues.
      4. 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.

      Attachments

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: