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

WALIterator broken (race on the switch to the next segment during iteration and concurrent archiving same segment)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: persistence
    • Labels:
      None

      Description

      FileArchiver

      
      final SegmentArchiveResult res = archiveSegment(toArchive);
      
      synchronized (this) {
       while (locked.containsKey(toArchive) && !stopped)
       wait();
      }
      
      // Firstly, format working file
      if (!stopped)
       formatFile(res.getOrigWorkFile());
      
      synchronized (this) {
       // Then increase counter to allow rollover on clean working file
       changeLastArchivedIndexAndNotifyWaiters(toArchive);
      
       notifyAll();
      }
      
      

      Some thread may try read segments when archive formating file in work dir (formatFile not synchronized), last archived index is still not updated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                akalashnikov Anton Kalashnikov
                Reporter:
                DmitriyGovorukhin Dmitriy Govorukhin
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: