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

TX SQL: restrict usages of unsupported APIs and configuration parameters

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.7
    • cache, mvcc, sql
    • None

    Description

      We need to make sure that when MVCC flag is enabled, users get correct exception in case of invalid configurations and/or API usages. Two general rules should apply
      1) SQL and cache operations cannot be mixed in the same transactions because they still use different APIs. This restriction will be removed in future when native cache API is reworked to new locking logic.
      2) If configuration is invalid or not-yet-supported API is called, user gets correct exception instead of invalid result.
      All listed cases must be covered with tests.

      Checklist:
      1) Cache configuration
      1.1) Cache store is not allowed for TX caches
      1.2) Expiry policy is not allowed for TX caches
      1.3) Interceptors are not allowed for TX caches

      2) Cache API unsupported operations - throw UnsupportedOperationException and create relevant ticket (if one doesn't exist):
      2.1) withExpiryPolicy
      2.2) Continuous queries
      2.3) "clear" method family
      2.4) "lock" method family
      2.5) "load" method family
      2.6) "peek" method family
      2.7) "evict" method family

      3) Cache API consistency - make sure that these operations use consistent snapshot assigned to transaction (as with other operations). If this is the case - do nothing; if this is not the case - throw UnsupportedOperationException and create a ticket (if one doesn't exist)
      3.1) Scan queries
      3.2) "size" method family
      3.3) Iterator methods (iterator, localEntries)

      4) Mixed native API and SQL usage is restricted and proper IgniteException is thrown. When snapshot is requested for the first time we should mark transation as either "SQL" or "native". If any SQL query is executed on "native" transaction or vice versa throw an exception (IllegalStateException? IgniteException?)

      Attachments

        Issue Links

          Activity

            People

              al.psc Alexander Paschenko
              vozerov Vladimir Ozerov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: