You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2018/03/12 08:43:00 UTC

[jira] [Created] (IGNITE-7911) TX SQL: restrict usages of unsupported APIs and configuration parameters

Vladimir Ozerov created IGNITE-7911:
---------------------------------------

             Summary: TX SQL: restrict usages of unsupported APIs and configuration parameters
                 Key: IGNITE-7911
                 URL: https://issues.apache.org/jira/browse/IGNITE-7911
             Project: Ignite
          Issue Type: Task
          Components: cache, sql
            Reporter: Vladimir Ozerov
            Assignee: Alexander Paschenko
             Fix For: 2.5


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?)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)