Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-11687

Concurrent WAL replay & log may fail with CRC error on read

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • persistence
    • None

    Description

      The cause is the way end is calculated for WAL iterator:

      if (hnd != null)
          end = hnd.position();
      
          @Override public FileWALPointer position() {
              lock.lock();
      
              try {
                  return new FileWALPointer(getSegmentId(), (int)written, 0);
              }
              finally {
                  lock.unlock();
              }
          }
      

      Consider a partially written entry. In this case, written has been already updated, concurrent WAL replay will attempt to read the incompletely written record and since end is not null, iterator will fail with CRC error.

      The issue may be rarely reproduced by IgniteWalSerializerVersionTest

      Attachments

        Issue Links

          Activity

            People

              akalashnikov Anton Kalashnikov
              agoncharuk Alexey Goncharuk
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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