[jira] [Commented] (IGNITE-9153) Accessing cache from transaction on client node, where it was not accessed yet throws an exception

2021-04-12 Thread Abhishek Chaturvedi (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-9153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17319489#comment-17319489
 ] 

Abhishek Chaturvedi commented on IGNITE-9153:
-

Hi, I checked, it is not working and still throws: class 
org.apache.ignite.IgniteException: Cannot start/stop cache within lock or 
transaction [cacheNames=DEMO_CACHE, operation=dynamicStartCache]\

IgniteCache igniteCache = ignite.getOrCreateCache("DEMO_CACHE");
FieldsQueryCursor> returnedList = null;
IgniteTransactions transactions = null;
Transaction tx = null;
try {
 transactions = ignite.transactions();
 tx = transactions.txStart();
 log.info("tx ::"+tx);
 returnedList = igniteCache.withKeepBinary().query(new 
SqlFieldsQuery(query).setArgs(parameters));
 tx.commit();
} catch (RuntimeException ex) {
 log.error(ex);
 tx.rollback();
} finally {
 if (tx != null) {
 tx.close();
 }
}

> Accessing cache from transaction on client node, where it was not accessed 
> yet throws an exception
> --
>
> Key: IGNITE-9153
> URL: https://issues.apache.org/jira/browse/IGNITE-9153
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.6
>Reporter: Evgenii Zhuravlev
>Priority: Major
>  Labels: newbie
> Attachments: ClientCacheTransactionsTest.java
>
>
> Exception message: Cannot start/stop cache within lock or transaction. 
> Reproducer is attached: ClientCacheTransactionsTest.java



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-9153) Accessing cache from transaction on client node, where it was not accessed yet throws an exception

2020-02-27 Thread Evgenii Zhuravlev (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-9153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17047072#comment-17047072
 ] 

Evgenii Zhuravlev commented on IGNITE-9153:
---

Hi,

As a workaround, you can access the same cache before starting a transaction, 
it will solve this issue

> Accessing cache from transaction on client node, where it was not accessed 
> yet throws an exception
> --
>
> Key: IGNITE-9153
> URL: https://issues.apache.org/jira/browse/IGNITE-9153
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.6
>Reporter: Evgenii Zhuravlev
>Priority: Major
>  Labels: newbie
> Attachments: ClientCacheTransactionsTest.java
>
>
> Exception message: Cannot start/stop cache within lock or transaction. 
> Reproducer is attached: ClientCacheTransactionsTest.java



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-9153) Accessing cache from transaction on client node, where it was not accessed yet throws an exception

2020-02-27 Thread Veena (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-9153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17047057#comment-17047057
 ] 

Veena commented on IGNITE-9153:
---

HI , 

I notice this behaviour as well. Ignite.cache() in the client node is giving me 
the exception "Cannot start/stop cache within lock or transaction" ( Please 
note, I am not doing ignite.getOrCreateCache().

 

Is there a solution for this ?

> Accessing cache from transaction on client node, where it was not accessed 
> yet throws an exception
> --
>
> Key: IGNITE-9153
> URL: https://issues.apache.org/jira/browse/IGNITE-9153
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.6
>Reporter: Evgenii Zhuravlev
>Priority: Major
>  Labels: newbie
> Attachments: ClientCacheTransactionsTest.java
>
>
> Exception message: Cannot start/stop cache within lock or transaction. 
> Reproducer is attached: ClientCacheTransactionsTest.java



--
This message was sent by Atlassian Jira
(v8.3.4#803005)