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

MVCC TX: Acquire write version if coordinator changed in the middle of tx.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • mvcc
    • None

    Description

      Current implementation suppose all transactions on previous coordinator were finished before new coordinator has been initialized, but there is a case when it isn't true.

      A tx which hasn't obtained a topology lock (hasn't done any updates) doesn't prevent a topology change, this way nothing prevent new transactions start.

      All newly created txs suppose all updates on previous coordinator are finished - this mean a possible update of mapped on previous coordinator txs is considered as stale regardless the tx is still active. We make such txs readonly to not break the visibility checking logic (see IGNITE-8841).

      There are two possible ways to allow writes after coordinator is changed:

      • collect active txs and their dependencies and populate the active txs list with them during a new coordinator initialization - this approach is quite complex and have obvious issues like necessity of using full tx versions in a snapshot
      • acquire a new version right after topology locked for writes using previously acquired "read" version for possible write conflicts detecting and visibility checking.

      I would prefer the second option as fully understandable and relatively easy to implement.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gvvinblade Igor Seliverstov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: