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

SafeTimeCandidateManager#commitIndex() fails assertion if indices have different terms

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta2
    • None

    Description

      SafeTimeCandidateManager#commitIndex() accepts a range of indices and a term corresponding to the last of these indices. It then tries to look up the corresponding timestamps by (index, term) pair.

      It might happen that it gets an interval of indices where some of them have one term, others have another term (in other words, the batch it gets might contain indices from different terms). Example:

      1. A command with index 29 and term 1 is applied
      2. Leader is changed and new configuration 'entry' is applied with index 30 and term 2
      3. commitIndex() is called for this batch with lastIndex=28, index=30 and term 2, so it tries to look up an index (29,1) and fails to do so, failing the assertion

      Attachments

        Issue Links

          Activity

            People

              Denis Chudov Denis Chudov
              rpuch Roman Puchkovskiy
              Roman Puchkovskiy Roman Puchkovskiy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m