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

Schema validation during tx processing: common framework

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None

    Description

      Definitions

      When a coordinator initiates a transaction, it takes a timestamp beginTs=Ts=Now and sends it to all participants. On first access to a table Q (in this transaction) on a primary replica node, the schema of Q is obtained for moment Ts; this schema is called ‘initial schema’ and associated with this transaction on this node. When a commit of the transaction is processed with commit timestamp Tc, the node obtains the schema of Q again, now at the moment of Tc; this is the ‘commit schema’. If the commit schema is different from the initial schema and not compatible with it (using the notion of the forward compatibility defined below), the commit fails (and the transaction is aborted).

      An initial schema is said to be forward-compatible with a commit schema if, having a tuple written with the initial schema, it is enough to know the commit schema to read the tuple.

      An initial schema is said to be backward-compatible with a commit schema if the same is true the other way around: having a tuple written with the commit schema, we can read it having just the initial schema.

      What to do

      We need to validate:

      • forward schema compatibility on commit
      • backward compatibility on reads in RW txs (this will be done in another task: IGNITE-19454)

      If a schema change is incompatible, the transaction is aborted.

      This task is about the implementation of a common framework allowing to do validations using specific validators and using this framework while processing transactions. Only one validator is needed for starters, it will consider all schema changes incompatible.

      Real validators will be added in a follow-up task.

      Attachments

        Issue Links

          Activity

            People

              rpuch Roman Puchkovskiy
              rpuch Roman Puchkovskiy
              Aleksandr Polovtsev Aleksandr Polovtsev
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 4h 40m
                  4h 40m