Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7240 Scaling HDFS
  3. HDFS-13024

Ozone: ContainerStateMachine should synchronize operations between createContainer and writeChunk

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • HDFS-7240
    • HDFS-7240
    • ozone
    • None
    • Reviewed

    Description

      This issue happens after HDFS-12853. with HDFS-12853, writeChunk op has been divided into two stages 1) the log write phase (here the state machine data is written) 2) ApplyTransaction.

      With a 3 node ratis ring, ratis leader will append the log entry to its log and forward it to its followers. However there is no guarantee on when the followers will apply the log to the state machine in applyTransaction.

      This issue happens in the following order

      1) Leader accepts create container
      2) Leader add entries to its logs and forwards to followers
      3) Followers append the entry to its log and Ack to the raft leader (Please note that the transaction still hasn't been applied)
      4) Leader applies the transaction and now replies
      5) write chunk call is sent to the Leader
      6) Leader now forwards the call to the followers
      7) Followers try to apply the log by calling Dispatcher#dispatch however the create container call in 3) still hasn't been applied
      8) write chunk call on followers fail.

      Attachments

        1. HDFS-13024-HDFS-7240.008.patch
          18 kB
          Mukul Kumar Singh
        2. HDFS-13024-HDFS-7240.007.patch
          18 kB
          Mukul Kumar Singh
        3. HDFS-13024-HDFS-7240.006.patch
          18 kB
          Mukul Kumar Singh
        4. HDFS-13024-HDFS-7240.005.patch
          18 kB
          Mukul Kumar Singh
        5. HDFS-13024-HDFS-7240.004.patch
          18 kB
          Mukul Kumar Singh
        6. HDFS-13024-HDFS-7240.003.patch
          16 kB
          Mukul Kumar Singh
        7. HDFS-13024-HDFS-7240.002.patch
          13 kB
          Mukul Kumar Singh
        8. HDFS-13024-HDFS-7240.001.patch
          13 kB
          Mukul Kumar Singh

        Activity

          People

            msingh Mukul Kumar Singh
            msingh Mukul Kumar Singh
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: