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

Failure to perform non-MVCC SQL from transactions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.8
    • Component/s: mvcc, sql
    • Labels:
      None

      Description

      MVCC was added with expectation is that it would not affect existing KV transactional code, neither SQL on non-TRANSACTIONAL_SNAPSHOT caches.

      However, this turned not to be the case: if you open an OPTIMISIC SERIALIZABLE transaction and do SQL query to fetch data from table, exception will be thrown with Only pessimistic repeatable read transactions are supported at the moment

      Exception in thread "main" javax.cache.CacheException: Only pessimistic repeatable read transactions are supported at the moment.
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:697)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:636)
      	at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:388)
      	at IgniteTransactionTester.testTransactionException(IgniteTransactionTester.java:53)
      	at IgniteTransactionTester.main(IgniteTransactionTester.java:38)
      Caused by: class org.apache.ignite.internal.processors.query.IgniteSQLException: Only pessimistic repeatable read transactions are supported at the moment.
      	at org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.tx(MvccUtils.java:690)
      	at org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.tx(MvccUtils.java:671)
      	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.runQueryTwoStep(IgniteH2Indexing.java:1793)
      	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunDistributedQuery(IgniteH2Indexing.java:2610)
      	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2315)
      	at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:2209)
      	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2135)
      	at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2130)
      	at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
      	at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2707)
      	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2144)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:685)
      	... 4 more
      

      This is a major regression towards 2.6. Please see linked reproducer (IgniteTransactionTester class).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rkondakov Roman Kondakov
                Reporter:
                ilyak Ilya Kasnacheev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 - 20m
                  20m