Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-560 Consensus/WAL/Transactions Optimizations and tests
  3. KUDU-792

Investigate "optimization" where LMP mismatch is handled in two places

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Private Beta
    • None
    • consensus
    • None

    Description

      We have a bit of code when handling the LMP mismatch that says:

        // If the terms mismatch we abort down to the index before the leader's preceding,
        // since we know that is the last opid that has a chance of not being overwritten.
        // Aborting preemptively here avoids us reporting a last received index that is
        // possibly higher than the leader's causing an avoidable cache miss on the leader's
        // queue.
        if (term_mismatch) {
          return state_->AbortOpsAfterUnlocked(req.preceding_opid->index() - 1);
        }
      

      The code looks like it's somewhat redundant (since we also abort operations elsewhere on the replica side), and it claims to be an optimization, but if we remove it, a bunch of correctness tests fail. We should understand better why this code is here and at least update the comment.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: