Uploaded image for project: 'Indy Node'
  1. Indy Node
  2. INDY-1642

3PC Batch should preserve the order of requests when applying PrePrepare on non-primary

    XMLWordPrintable

Details

    • Task
    • Status: Complete
    • High
    • Resolution: Done
    • None
    • 1.6.73
    • None
    • None
    • EV 18.17 Service Pack, EV 18.18 Service Pack 2
    • Unset

    Description

      Primary doesn't preserve the order of requests it applied them, so it may lead to different results of dynamic validation and Suspicious Exception on non-primaries.

      It may lead to a lot of View Changes.

      Example:

      • When master primary creates a PrePrepare it iterates through requests in some order, let's say [R1, R2, R3, R4, R5]
      • Let's assume that request R1 and R2 can be created only after R3, so they fail dynamic validation.
      • As a result, a list of valid requests is [R3, R4, R5], and a list of invalid is [R1, R2].
      • When PrePrepare is created, it get a list of reqs as valid + invalid, that is [R3, R4, R5, R1, R2], which is not equal to the initial list the master primary iterated through.
      • Non-primary replicas will apply PrePrepares in the order as specified in PrePrepare, that is [R3, R4, R5, R1, R2], and for it R1 and R2 will pass dynamic validation since R3 is already created.
      • So, non-primaries will raise Suspicious code and trigger view change.

       

      Acceptance criteria:

      • Preserve the order of requests for master primary in PrePrepare
      • Have a bitmask to mark invalid requests
      • Extend dynamic validation to eack the bitmask
      • Enhance creation of Ordered requests to get only the valid ones

      Attachments

        Issue Links

          Activity

            People

              zhigunenko.dsr NIkita Zhigunenko
              ashcherbakov Alexander Shcherbakov
              Alexander Shcherbakov, Andrew Nikitin, NIkita Zhigunenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: