Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6606

Journal partial write can result in batch corruption on restart

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.14.0
    • 5.15.0, 5.14.4, 5.14.5
    • KahaDB
    • None

    Description

      Recovery checking on kahadb will ignore a partial journal write at the end of the journal. However repeated write errors increment the write offset and if a subsequent write succeeds recovery fails reporting a corrupt block.

       MessageDatabase  | emq.store.kahadb.MessageDatabase | Detected corrupt journal files. [34:43883209 >= key < 34:47226069]
      

      One scenario is write failure for no space followed by gc which allows subsequent writes to complete.
      A failed write or sync should fail with an exception and should revert any offset increment such that a subsequent write reuses that offset, avoiding a partial write corruption.

      Attachments

        Issue Links

          Activity

            People

              gtully Gary Tully
              gtully Gary Tully
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: