Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-2729

flushCache should write to a tmp directory and then move into the store directory

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.90.0
    • 0.90.0
    • regionserver
    • None
    • Reviewed

    Description

      Currently it appears that internalFlushCache writes directly to the target spot of the flushed data. The finally() block appends the metadata and closes the file as if nothing bad went wrong in case of an exception. This is really bad, since it means that an IOE in the middle of flushing cache could easily write a valid looking file with only half the data, which would then prevent us from recovering those edits during log replay.

      Instead, it should flush to a tmp location and move it into the region dir only after it's successfully written.

      Attachments

        1. hbase-2729.txt
          17 kB
          Todd Lipcon
        2. hbase-2729.txt
          26 kB
          Todd Lipcon

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            stack Michael Stack
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment