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

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.5
    • 2.5
    • persistence
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: