[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074064#comment-16074064 ] ASF GitHub Bot commented on IGNITE-945: --- Github user samaitra closed the pull request at: https://github.com/apache/ignite/pull/847 > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: clients >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15384270#comment-15384270 ] Saikat Maitra commented on IGNITE-945: -- [~dmagda] Thank you Denis !!! Regards Saikat > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15383851#comment-15383851 ] Denis Magda commented on IGNITE-945: [~samaitra], I've slightly improved your fix and merged the fix into the master. Thanks again for the contribution! > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15379950#comment-15379950 ] Saikat Maitra commented on IGNITE-945: -- [~dmagda] Hello Denis, I have modified the files and updated the PR. Please let me know if you have any more feedback. Regards, Saikat > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375309#comment-15375309 ] Saikat Maitra commented on IGNITE-945: -- [~dmagda] Thank you for detailed feedback Denis. I will make the changes and update the PR. Regards Saikat > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15373279#comment-15373279 ] Denis Magda commented on IGNITE-945: [~samaitra], 1) {{EntryProcessor}} already returns you an entry for the requested key - {{MutableEntry entry}}. You mustn't execute any cache related operations inside of your {{EntryProcessor}} implementation and should perform the following instead: - get current entry's value using {{entry.getValue()}} call. If the value is null then return {{false}} right away. - if the value is not null execute {{appendOrPrepend}} operation creating the new value and apply it to the entry using {{entry.setValue(newValue)}}. 2) there is no need to execute the check below because the value can be added in between and this is already check with {{EntryProcessor}}. Please remove the code. {code} if (!cache.containsKey(key)) { if (prepend) { throw new IgniteCheckedException("Failing prepend operation (Invalid key is not allowed)."); } else if (!prepend) { throw new IgniteCheckedException("Failing append operation (Invalid key is not allowed)."); } } {code} 3) {{GridCacheCommandHandlerSelfTest}} is still executed only for {{TRANSACTIONAL}} cache. Do the following - add {{protected CacheAtomicityMode atomicityMode()}} method to {{GridCacheCommandHandlerSelfTest}} and return {{TRANSACTIONAL}} mode in the default implementation. - introduce new test class {{GridAtomicCacheCommandHandlerSelfTest}} that will extend {{GridCacheCommandHandlerSelfTest}} overriding {{atomicityMode()}} method by returning {{ATOMIC}} mode instead. - {{atomicityMode()}} method must be called in {{GridCacheCommandHandlerSelfTest.getConfiguration()}} right after the line with {{cacheCfg.setCacheMode(CacheMode.LOCAL)}}. > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15371029#comment-15371029 ] Saikat Maitra commented on IGNITE-945: -- [~dmagda] Thank you Denis. Regards Saikat > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370451#comment-15370451 ] Denis Magda commented on IGNITE-945: Hi Saikat, thanks I'll take a look at your changes tomorrow. > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1533#comment-1533 ] Saikat Maitra commented on IGNITE-945: -- [~dmagda] Hi Denis, Thank you for reviewing the PR. I have changed the implementation to use EntryProcessor. There are two cases, one when cacheAtomicityMode is TRANSACTIONAL and when it is not. In case of Transactional cache I have used IgniteInternalTx otherwise the unit tests fails because the transaction is automatically rollbacked. In case of non transactional cache we get error transactional mode is not supported in non-transactional cache. Please review the changes and let me know if any further change is required. Regards Saikat > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364608#comment-15364608 ] Denis Magda commented on IGNITE-945: [~samaitra], please use the approach suggested by Yakov above. In your current implementation the whole operation is not atomic. Use {{cache.invoke}} - it was suggested by Yakov when he mentioned {{EntryProcessor}}. > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > Fix For: 1.7 > > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-945) HTTP REST prepend/append commands failed
[ https://issues.apache.org/jira/browse/IGNITE-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360646#comment-15360646 ] ASF GitHub Bot commented on IGNITE-945: --- GitHub user samaitra opened a pull request: https://github.com/apache/ignite/pull/847 IGNITE-945 HTTP REST prepend/append commands failed You can merge this pull request into a Git repository by running: $ git pull https://github.com/samaitra/ignite IGNITE-945 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/847.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #847 commit 6334754b5f106a9eee34a0f086aca8a5f92ee04f Author: samaitra Date: 2016-07-02T22:00:36Z IGNITE-945 HTTP REST prepend/append commands failed commit d58d7eaaa29790226dc8fca4517b19a19b4acffd Author: samaitra Date: 2016-07-03T19:14:32Z IGNITE-945 HTTP REST prepend/append commands failed commit 813dc9774f38454de19b814a72b9745523c8a095 Author: samaitra Date: 2016-07-03T19:16:46Z IGNITE-945 HTTP REST prepend/append commands failed commit 436fe5057419793b14fa574ae9c019690045fd1b Author: samaitra Date: 2016-07-03T19:17:58Z IGNITE-945 HTTP REST prepend/append commands failed > HTTP REST prepend/append commands failed > > > Key: IGNITE-945 > URL: https://issues.apache.org/jira/browse/IGNITE-945 > Project: Ignite > Issue Type: Bug > Components: newbie >Affects Versions: sprint-5 >Reporter: Sergey Kozlov >Assignee: Saikat Maitra > Labels: newbie > > Requests > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=prepend&val=p > http://localhost:8080/ignite?cacheName=partitioned_cache&key=1&cmd=append&val=a > returns same error: > {noformat} > {"error":"Failed to start transaction on non-transactional cache: > partitioned_cache","response":null,"sessionToken":"","successStatus":1} > {noformat} > Node output is following: > {noformat} > [14:01:32,555][SEVERE][ignite-#12%pub-null%][GridRestProcessor] Failed to > handle request: CACHE_PREPEND > class org.apache.ignite.IgniteCheckedException: Failed to start transaction > on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:6732) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:901) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: class org.apache.ignite.IgniteException: Failed to start > transaction on non-transactional cache: partitioned_cache > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.checkTransactional(IgniteTransactionsImpl.java:193) > at > org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStartEx(IgniteTransactionsImpl.java:121) > at > org.apache.ignite.internal.processors.cache.GridCacheAdapter.txStartEx(GridCacheAdapter.java:3239) > at > org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.txStartEx(GridCacheProxyImpl.java:808) > at > org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler$1.call(GridCacheCommandHandler.java:405) > at > org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6124) > at > org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:893) > ... 4 more > {noformat} > Is there a limitation for use non-transactional caches for prepend/append > commands? -- This message was sent by Atlassian JIRA (v6.3.4#6332)