Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-784

CorruptedLogFileException sometimes happens on GCS

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6.0
    • None

    Description

      768726 [Executor task launch worker-2] ERROR org.apache.hudi.common.table.log.AbstractHoodieLogRecordScanner - Got exception when reading log file
      org.apache.hudi.exception.CorruptedLogFileException: HoodieLogFile

      {pathStr=' [gs://.log.|gs://1_20200219014757.log.2] ', fileLen=0}

      could not be read. Did not find the magic bytes at the start of the block
      at org.apache.hudi.common.table.log.HoodieLogFileReader.readMagic(HoodieLogFileReader.java:313)
      at org.apache.hudi.common.table.log.HoodieLogFileReader.hasNext(HoodieLogFileReader.java:295)
      at org.apache.hudi.common.table.log.HoodieLogFormatReader.hasNext(HoodieLogFormatReader.java:103)
       

      I did extensive debugging and still unclear on why it is happening. It might be issue with GCS libraries themselves. The fix that is working:

       

      In: HoodieLogFileReader made 

      // private final byte[] magicBuffer = new byte[6];
      

      non static. I'm not sure why it is actually static in the first place as it is inviting a race.

      Also in HoodieLogFileReader:

      added

      // fsDataInputStream.seek(0);
      

      added right after stream creation in the constructor.

       

       

       

       

       

       

      Attachments

        Activity

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

          People

            Unassigned Unassigned Assign to me
            afilipchik Alexander Filipchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 10m
              10m

              Slack

                Issue deployment