Re: Migrate from 2.6 to 2.7
Hello! thanks for prompt resolution, will try once 2.8 is out. Best! -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Migrate from 2.6 to 2.7
Hi, No, I am not using JDBC driver. Re switching to the pessimistic transaction, tried but is not working correctly in some cases, for instance, .clear() on caches and some more... which is fine as Igniters state it's not production ready yet. Obviously happy guys you are adding new transaction semantics :) -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Migrate from 2.6 to 2.7
Hello! Cross-posting: I have filed a blocker ticket about it. https://issues.apache.org/jira/browse/IGNITE-10884 Regards, -- Ilya Kasnacheev чт, 3 янв. 2019 г. в 03:24, Denis Magda : > Are you using JDBC/ODBC drivers? Just want to know why it's hard to > execute SQL queries outside of transactions. > > Can you switch to pessimistic transactions instead? > > -- > Denis > > On Wed, Jan 2, 2019 at 7:24 AM whiteman wrote: > >> Hi guys, >> >> As far as I am concerned this is a breaking behaviour. In Apache Ignite v >> 2.5 it was possible to have the SQL query inside the optimistic >> serializable >> transaction. Point here is that SQL query might not be part of the >> transaction (no guarantees) but was at least performed. In 2.7 this code >> won't work at all. The advice to move all SQL queries outside the >> transactions is in real world not possible. It would greatly increased >> complexity of the codebase. My question is if there is a switch for >> enabling >> pre 2.7 behaviour. >> >> THanks, >> Cheers, >> D. >> >> >> >> -- >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >> >
Re: Migrate from 2.6 to 2.7
Are you using JDBC/ODBC drivers? Just want to know why it's hard to execute SQL queries outside of transactions. Can you switch to pessimistic transactions instead? -- Denis On Wed, Jan 2, 2019 at 7:24 AM whiteman wrote: > Hi guys, > > As far as I am concerned this is a breaking behaviour. In Apache Ignite v > 2.5 it was possible to have the SQL query inside the optimistic > serializable > transaction. Point here is that SQL query might not be part of the > transaction (no guarantees) but was at least performed. In 2.7 this code > won't work at all. The advice to move all SQL queries outside the > transactions is in real world not possible. It would greatly increased > complexity of the codebase. My question is if there is a switch for > enabling > pre 2.7 behaviour. > > THanks, > Cheers, > D. > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
Re: Migrate from 2.6 to 2.7
Hi guys, As far as I am concerned this is a breaking behaviour. In Apache Ignite v 2.5 it was possible to have the SQL query inside the optimistic serializable transaction. Point here is that SQL query might not be part of the transaction (no guarantees) but was at least performed. In 2.7 this code won't work at all. The advice to move all SQL queries outside the transactions is in real world not possible. It would greatly increased complexity of the codebase. My question is if there is a switch for enabling pre 2.7 behaviour. THanks, Cheers, D. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Migrate from 2.6 to 2.7
Thanks. This helped, but it requires deactivate all cluster and delete "work" dir, else i had error like "different field type parentId: field1: Object, field2: uuid". Just restart cluster didn't help. I found one way: recreate uuid field via sql (sqline) without data lost (create other column, move data etc.). But you are right this is bug. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Migrate from 2.6 to 2.7
Hello! Looks like you can't have a generic field in your class and then put UUID to it. UUID is a primitive type as far as Ignite is concerned, which will take 6 bytes, but a smallest Object (which is the fallback type for generic field) is 8 bytes, hence cryptic errors. If you change P to UUID in your GenericChildModel it will fix your case. I still think this is a bug. I can see that there is https://issues.apache.org/jira/browse/IGNITE-10635 I hope it gets attention. Regards, -- Ilya Kasnacheev вт, 11 дек. 2018 г. в 19:29, xtron : > Thanks. I use sql in transaction context, but in 2.6 I havent problem this. > Now I changed mode to TRANSACTIONAL_SNAPSHOT and Transaction to pessimistic > repeatable and problem was gone. > > About first problem.. I create small project to reproduce it. > > https://www.dropbox.com/s/tvxfi2pnmlouton/testproj.zip > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
Re: Migrate from 2.6 to 2.7
Thanks. I use sql in transaction context, but in 2.6 I havent problem this. Now I changed mode to TRANSACTIONAL_SNAPSHOT and Transaction to pessimistic repeatable and problem was gone. About first problem.. I create small project to reproduce it. https://www.dropbox.com/s/tvxfi2pnmlouton/testproj.zip -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Migrate from 2.6 to 2.7
Hi Andrey, It looks like you try to run "Select" sql query inside explicit transaction. Please, let us know if it is not true. This was workable in 2.7 as SQL had no transactional support and query just ignored transactional context (however "Select for Update" wasn't). For now, SQL Select query supports transactions for TRANSACTIONAL_SNAPSHOT cache mode and tries to validate transaction context that causes exception you have faced. So, you have to use TRANSACTIONAL_SNAPSHOT atomicity mode as Ivan suggested or move Select query to outside of transaction. On Tue, Dec 11, 2018 at 5:53 PM Павлухин Иван wrote: > Hi Andrey, > > It looks like your persisted data was read incorrectly by upgraded > Ignite. It would be great if you provide runnable reproducer. > > Regarding Optimistic Serializable transactions. They are still > supported by caches with TRANSACTIONAL atomicity mode. In your error > it looks like that your caches are treated as TRANSACTIONAL_SNAPSHOT > atomicity mode. You can read about that (experimental) mode in > documentation [1]. Briefly, this mode allows SQL transactions and > supports only PESSIMISTIC REPEATABLE_READ transaction configuration. > > [1] > https://apacheignite-sql.readme.io/v2.7/docs/multiversion-concurrency-control > пн, 10 дек. 2018 г. в 17:13, Андрей Григорьев : > > > > Hello, when I tried to migrate to new version i had error. Optimistic > Serializable isn't supported? > > > > > > ``` > > 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) > > ... 10 more > > ``` > > Enviroment: JDK 1.8, Apache Ignite 2.7 (clear install, persistence mode, > 3 nodes). Apache Ignite Client 2.7 from maven: > > > > 2.7.0 > > > > > > org.apache.ignite > > ignite-core > > ${ignite.version} > > > > > > org.apache.ignite > > ignite-indexing > > ${ignite.version} > > > > > > Cache configuration: > > > > CacheConfiguration cfg = new CacheConfiguration<>(); > > cfg.setBackups(backupsCount); > > cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); > > > > Transaction configuration: > > > > TransactionConfiguration txCfg = new TransactionConfiguration(); > > txCfg.setDefaultTxConcurrency(TransactionConcurrency.OPTIMISTIC); > > txCfg.setDefaultTxIsolation(TransactionIsolation.SERIALIZABLE); > > cfg.setTransactionConfiguration(txCfg); > > > > And second exception from nodes, when i try to read persisted value from > cache (set transaction mode to pessimistic repetable). > > > > ``` > > [15:33:46,990][SEVERE][query-#278][GridMapQueryExecutor] Failed to > execute local query. > > class org.apache.ignite.IgniteCheckedException: Failed to execute SQL > query. Внутренняя ошибка: "class > org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: > Runtime failure on bounds: [lower=RowSimple [vals=[null, null, null, null, > null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]], > upper=RowSimple [vals=[null, null, null, null, null, null, null, > 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]]]" > > General error: "class > org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: > Runtime failure on bounds: [lower=RowSimple [vals=[null, null, null, null, > null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]], > upper=RowSimple [vals=[null, null, null, null, null, null, null, > 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]]]"; SQL statement: > > SELECT > > "HumanName".__Z0._KEY __C0_0, > > "HumanName".__Z0._VAL __C0_1 > > FROM "HumanName".HUMANNAMEMODEL __Z0 > > WHERE (__Z0.PARENTID = ?1) AND (__Z0.VERSION = ?2)
Re: Migrate from 2.6 to 2.7
Hi Andrey, It looks like your persisted data was read incorrectly by upgraded Ignite. It would be great if you provide runnable reproducer. Regarding Optimistic Serializable transactions. They are still supported by caches with TRANSACTIONAL atomicity mode. In your error it looks like that your caches are treated as TRANSACTIONAL_SNAPSHOT atomicity mode. You can read about that (experimental) mode in documentation [1]. Briefly, this mode allows SQL transactions and supports only PESSIMISTIC REPEATABLE_READ transaction configuration. [1] https://apacheignite-sql.readme.io/v2.7/docs/multiversion-concurrency-control пн, 10 дек. 2018 г. в 17:13, Андрей Григорьев : > > Hello, when I tried to migrate to new version i had error. Optimistic > Serializable isn't supported? > > > ``` > 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) > ... 10 more > ``` > Enviroment: JDK 1.8, Apache Ignite 2.7 (clear install, persistence mode, 3 > nodes). Apache Ignite Client 2.7 from maven: > > 2.7.0 > > > org.apache.ignite > ignite-core > ${ignite.version} > > > org.apache.ignite > ignite-indexing > ${ignite.version} > > > Cache configuration: > > CacheConfiguration cfg = new CacheConfiguration<>(); > cfg.setBackups(backupsCount); > cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); > > Transaction configuration: > > TransactionConfiguration txCfg = new TransactionConfiguration(); > txCfg.setDefaultTxConcurrency(TransactionConcurrency.OPTIMISTIC); > txCfg.setDefaultTxIsolation(TransactionIsolation.SERIALIZABLE); > cfg.setTransactionConfiguration(txCfg); > > And second exception from nodes, when i try to read persisted value from > cache (set transaction mode to pessimistic repetable). > > ``` > [15:33:46,990][SEVERE][query-#278][GridMapQueryExecutor] Failed to execute > local query. > class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query. > Внутренняя ошибка: "class > org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: > Runtime failure on bounds: [lower=RowSimple [vals=[null, null, null, null, > null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]], > upper=RowSimple [vals=[null, null, null, null, null, null, null, > 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]]]" > General error: "class > org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: > Runtime failure on bounds: [lower=RowSimple [vals=[null, null, null, null, > null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]], > upper=RowSimple [vals=[null, null, null, null, null, null, null, > 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]]]"; SQL statement: > SELECT > "HumanName".__Z0._KEY __C0_0, > "HumanName".__Z0._VAL __C0_1 > FROM "HumanName".HUMANNAMEMODEL __Z0 > WHERE (__Z0.PARENTID = ?1) AND (__Z0.VERSION = ?2) [5-197] > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:1428) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1489) > at > org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:930) > at > org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:705) > at > org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:240) > at >
Migrate from 2.6 to 2.7
Hello, when I tried to migrate to new version i had error. Optimistic Serializable isn't supported? ``` 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) ... 10 more ``` Enviroment: JDK 1.8, Apache Ignite 2.7 (clear install, persistence mode, 3 nodes). Apache Ignite Client 2.7 from maven: 2.7.0 org.apache.ignite ignite-core ${ignite.version} org.apache.ignite ignite-indexing ${ignite.version} Cache configuration: CacheConfiguration cfg = new CacheConfiguration<>(); cfg.setBackups(backupsCount); cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); Transaction configuration: TransactionConfiguration txCfg = new TransactionConfiguration(); txCfg.setDefaultTxConcurrency(TransactionConcurrency.OPTIMISTIC); txCfg.setDefaultTxIsolation(TransactionIsolation.SERIALIZABLE); cfg.setTransactionConfiguration(txCfg); And second exception from nodes, when i try to read persisted value from cache (set transaction mode to pessimistic repetable). ``` [15:33:46,990][SEVERE][query-#278][GridMapQueryExecutor] Failed to execute local query. class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query. Внутренняя ошибка: "class org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: Runtime failure on bounds: [lower=RowSimple [vals=[null, null, null, null, null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]], upper=RowSimple [vals=[null, null, null, null, null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]]]" General error: "class org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException: Runtime failure on bounds: [lower=RowSimple [vals=[null, null, null, null, null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]], upper=RowSimple [vals=[null, null, null, null, null, null, null, 'e3f070fa-7888-4fbb-baac-a02d5338e217', 1]]]"; SQL statement: SELECT "HumanName".__Z0._KEY __C0_0, "HumanName".__Z0._VAL __C0_1 FROM "HumanName".HUMANNAMEMODEL __Z0 WHERE (__Z0.PARENTID = ?1) AND (__Z0.VERSION = ?2) [5-197] at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:1428) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1489) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:930) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:705) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:240) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor$2.onMessage(GridMapQueryExecutor.java:200) at org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:2349) at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1569) at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1197) at org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:127) at org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1093) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.h2.jdbc.JdbcSQLException: Внутренняя ошибка: "class