Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9255

If a memtable flush fails, possible deadlock for future flushes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None
    • Normal

    Description

      If a memtable flush throws and exception, it won't signal the countdown latch that the post flush task is waiting on. Since the post flush executor is single threaded, it will continue to wait on its countdown latch and will not process any additional post flush tasks. After that, any blocking flush will deadlock waiting for the post flush task to finish.

      I hit this while I was adding tests for CASSANDRA-9057 where the memtable failed to write because my validation was wrong and then it deadlocked creating a new table, but it should be safeguarded against the possibility that a memtable flush fails for any reason.

      Attaching the jstack showing the deadlock.

      Attachments

        1. jstack.txt
          29 kB
          Carl Yeksigian

        Issue Links

          Activity

            People

              benedict Benedict Elliott Smith
              carlyeks Carl Yeksigian
              Benedict Elliott Smith
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: