Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15726

Client should only complete a file if the last block is finalized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      We have seen certain versions of DFS client manage to call completeFile() before the blocks are finalized. This is ensured by the way colseImpl() is written. When the logic and sematics around flushing or closing changes, this can easily break, but hard to notice by just looking at the code.

      We propose adding a simple yet explicit logic to prevent any violation of this protocol. completeFile() won't be called unless it has received an ack for the last packet (the one causes finalization on the datanode side). This will fix any current bug and also likely prevent inadvertently breaking it in the future.

      Attachments

        Issue Links

          Activity

            People

              ahussein Ahmed Hussein
              kihwal Kihwal Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: