Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-1160

Possible deadlock between LogManager and LogFlusher

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TX - Transactions
    • Labels:
      None

      Description

      Currently when LogFlusher thread flushes a full log tail buffer, it calls PrimaryIndexOpeartionTracker.completeOperation. If the completeOperation call results in generating a FLUSH log type and the LogManager has no empty log buffers available to log it, a deadlock happens.

      To reproduce the deadlock with high probabilty, set the number of log pages in the asterix configuration to 1 and a small size, then load some data to the system.

      The proposed solution is to have a different thread responsible for logging FLUSH logs. This way logging FLUSH logs will have to wait until an empty log buffer becomes available to the LogManager on a different thread than the LogFlusher.

        Attachments

          Activity

            People

            • Assignee:
              mhubail Murtadha Makki Al Hubail
              Reporter:
              mhubail Murtadha Makki Al Hubail
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: