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

Schema validation refactoring with configuration validators

    XMLWordPrintableJSON

Details

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

    Description

      1. TableValidator code exists, but validator is never registered. Let's fix this.
      2. ColumnType configuration is not validated. Let's mark all properties as immutable and add a validator for ColumnType to verify all linked properties and the whole type can be built correctly.
      3. Some values make no sense in some cases (e.g. precision for non-numeric types). It is ok as the will be removed once the polymorphic validator will be implemented. These values don't affect configuration correctness as they will be never used.
      4. Because of table configuration public keys and internal keys are written within the same transaction, and validation happens just before the transaction commit, it is possible internal keys calculation will be failed with IllegalArgumentException.
      It is expected the only Validation exception will be thrown, but there is no way, for now, to force configuration validation on incomplete change.
      Let's just rethrow the correct exception and left a TODO with a link to IGNITE-15747.

      Attachments

        Issue Links

          Activity

            People

              amashenkov Andrey Mashenkov
              alapin Alexander Lapin
              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 - 2h
                  2h