[ https://issues.apache.org/jira/browse/IGNITE-14204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Sapego reassigned IGNITE-14204: ------------------------------------ Assignee: Igor Sapego > cpp thin client transaction :Transaction with id 1 not found. > ------------------------------------------------------------- > > Key: IGNITE-14204 > URL: https://issues.apache.org/jira/browse/IGNITE-14204 > Project: Ignite > Issue Type: Bug > Components: thin client > Affects Versions: 2.10 > Reporter: YuJue Li > Assignee: Igor Sapego > Priority: Critical > Labels: c++ > Fix For: 2.10 > > > Using the 2.10 branch code and the transaction function of cpp thin client, > the transaction with id 1 not found error will be throw. the reproduce steps > are as follows: > 1.start two nodes on two hosts use the following config file: > {color:#808080}<?{color}{color:#569cd6}xml{color}{color:#9cdcfe} > version{color}{color:#d4d4d4}={color}{color:#ce9178}"1.0"{color}{color:#9cdcfe} > > encoding{color}{color:#d4d4d4}={color}{color:#ce9178}"UTF-8"{color}{color:#808080}?>{color} > {color:#808080}<{color}{color:#569cd6}beans{color} > {color:#9cdcfe}xmlns{color}{color:#d4d4d4}={color}{color:#ce9178}["http://www.springframework.org/schema/beans"|http://www.springframework.org/schema/beans]{color} > {color:#9cdcfe}xmlns:xsi{color}{color:#d4d4d4}={color}{color:#ce9178}["http://www.w3.org/2001/XMLSchema-instance"|http://www.w3.org/2001/XMLSchema-instance]{color} > {color:#9cdcfe}xsi:schemaLocation{color}{color:#d4d4d4}={color}{color:#ce9178}"{color} > {color:#ce9178} [http://www.springframework.org/schema/beans]{color} > {color:#ce9178} > [http://www.springframework.org/schema/beans/spring-beans.xsd]"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}bean{color} > {color:#9cdcfe}id{color}{color:#d4d4d4}={color}{color:#ce9178}"grid.cfg"{color} > > {color:#9cdcfe}class{color}{color:#d4d4d4}={color}{color:#ce9178}"org.apache.ignite.configuration.IgniteConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"clientMode"{color} > > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"false"{color} > {color:#808080}/>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"peerClassLoadingEnabled"{color} > > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"true"{color}{color:#808080}/>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"binaryConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}bean{color} > {color:#9cdcfe}class{color}{color:#d4d4d4}={color}{color:#ce9178}"org.apache.ignite.configuration.BinaryConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"compactFooter"{color} > > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"false"{color} > {color:#808080}/>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"idMapper"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}bean{color} > {color:#9cdcfe}class{color}{color:#d4d4d4}={color}{color:#ce9178}"org.apache.ignite.binary.BinaryBasicIdMapper"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"lowerCase"{color} > > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"true"{color} > {color:#808080}/>{color} > {color:#808080}</{color}{color:#569cd6}bean{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}property{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}bean{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}property{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"dataStorageConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}bean{color} > {color:#9cdcfe}class{color}{color:#d4d4d4}={color}{color:#ce9178}"org.apache.ignite.configuration.DataStorageConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"defaultDataRegionConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}bean{color} > {color:#9cdcfe}class{color}{color:#d4d4d4}={color}{color:#ce9178}"org.apache.ignite.configuration.DataRegionConfiguration"{color}{color:#808080}>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"name"{color} > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"default"{color} > {color:#808080}/>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"maxSize"{color} > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"#\{1L * > 1024 * 1024 * 1024}"{color} {color:#808080}/>{color} > {color:#808080}<{color}{color:#569cd6}property{color} > {color:#9cdcfe}name{color}{color:#d4d4d4}={color}{color:#ce9178}"persistenceEnabled"{color} > > {color:#9cdcfe}value{color}{color:#d4d4d4}={color}{color:#ce9178}"false"{color} > {color:#808080}/>{color} > {color:#808080}</{color}{color:#569cd6}bean{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}property{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}bean{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}property{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}bean{color}{color:#808080}>{color} > {color:#808080}</{color}{color:#569cd6}beans{color}{color:#808080}>{color} > 2.test code are as follows: > Usually only the first few loop operations may throw an exception, and the > subsequent operations are normal. > {color:#c586c0}#include{color} {color:#ce9178}<stdint.h>{color} > {color:#c586c0}#include{color} {color:#ce9178}<iostream>{color} > {color:#c586c0}#include{color} > {color:#ce9178}<ignite/thin/ignite_client.h>{color} > {color:#c586c0}#include{color} > {color:#ce9178}<ignite/thin/cache/cache_client.h>{color} > {color:#c586c0}#include{color} > {color:#ce9178}"ignite/examples/organization.h"{color} > {color:#c586c0}using{color} {color:#569cd6}namespace{color} > {color:#4ec9b0}ignite{color}{color:#d4d4d4};{color} > {color:#c586c0}using{color} {color:#569cd6}namespace{color} > {color:#4ec9b0}thin{color}{color:#d4d4d4};{color} > {color:#c586c0}using{color} {color:#569cd6}namespace{color} > {color:#4ec9b0}cache{color}{color:#d4d4d4};{color} > {color:#c586c0}using{color} {color:#569cd6}namespace{color} > {color:#4ec9b0}examples{color}{color:#d4d4d4};{color} > {color:#569cd6}int{color} {color:#dcdcaa}main{color}{color:#d4d4d4}(){color} > {color:#d4d4d4}{{color} > {color:#d4d4d4} IgniteClientConfiguration cfg;{color} > > {color:#9cdcfe}cfg{color}{color:#d4d4d4}.{color}{color:#dcdcaa}SetEndPoints{color}{color:#d4d4d4}({color}{color:#ce9178}"X.X.X.X"{color}{color:#d4d4d4});{color} > {color:#c586c0}try{color} > {color:#d4d4d4} { {color} > {color:#d4d4d4} IgniteClient client = > {color}{color:#4ec9b0}IgniteClient{color}{color:#d4d4d4}::{color}{color:#dcdcaa}Start{color}{color:#d4d4d4}(cfg); > {color} > {color:#d4d4d4} > CacheClient<{color}{color:#569cd6}int32_t{color}{color:#d4d4d4}, > Organization> cache = > {color}{color:#9cdcfe}client{color}{color:#d4d4d4}.{color}{color:#9cdcfe}GetOrCreateCache{color}{color:#d4d4d4}<{color}{color:#569cd6}int32_t{color}{color:#d4d4d4}, > > Organization>({color}{color:#ce9178}"PutGetExample"{color}{color:#d4d4d4});{color} > {color:#9cdcfe}cache{color}{color:#d4d4d4}.{color}{color:#dcdcaa}Clear{color}{color:#d4d4d4}();{color} > {color:#569cd6}int{color}{color:#d4d4d4} loop = > {color}{color:#b5cea8}100{color}{color:#d4d4d4};{color} > {color:#c586c0}for{color}{color:#d4d4d4} > ({color}{color:#569cd6}int{color}{color:#d4d4d4} i = > {color}{color:#b5cea8}0{color}{color:#d4d4d4}; i < loop; i++){color} > {color:#d4d4d4} {{color} > {color:#4ec9b0}ignite{color}{color:#d4d4d4}::{color}{color:#4ec9b0}thin{color}{color:#d4d4d4}::{color}{color:#4ec9b0}transactions{color}{color:#d4d4d4}::ClientTransaction > transaction = > {color}{color:#9cdcfe}client{color}{color:#d4d4d4}.{color}{color:#dcdcaa}ClientTransactions{color}{color:#d4d4d4}().{color}{color:#dcdcaa}TxStart{color}{color:#d4d4d4}();{color} > {color:#d4d4d4} Organization > {color}{color:#dcdcaa}org{color}{color:#d4d4d4}({color}{color:#ce9178}"Microsoft"{color}{color:#d4d4d4}, > > {color}{color:#dcdcaa}Address{color}{color:#d4d4d4}({color}{color:#ce9178}"1096 > Eddy Street, San Francisco, CA"{color}{color:#d4d4d4}, i));{color} > {color:#9cdcfe}cache{color}{color:#d4d4d4}.{color}{color:#dcdcaa}Put{color}{color:#d4d4d4}({color}{color:#b5cea8}1{color}{color:#d4d4d4}, > org); {color} > {color:#9cdcfe}transaction{color}{color:#d4d4d4}.{color}{color:#dcdcaa}Commit{color}{color:#d4d4d4}();{color} > {color:#d4d4d4} }{color} > {color:#d4d4d4} Organization orgFromCache = > {color}{color:#9cdcfe}cache{color}{color:#d4d4d4}.{color}{color:#dcdcaa}Get{color}{color:#d4d4d4}({color}{color:#b5cea8}1{color}{color:#d4d4d4});{color} > {color:#d4d4d4} }{color} > {color:#c586c0}catch{color}{color:#d4d4d4} (IgniteError& err){color} > {color:#d4d4d4} {{color} > {color:#4ec9b0}std{color}{color:#d4d4d4}::cout << {color}{color:#ce9178}"An > error occurred: "{color}{color:#d4d4d4} << > {color}{color:#9cdcfe}err{color}{color:#d4d4d4}.{color}{color:#dcdcaa}GetText{color}{color:#d4d4d4}() > << {color}{color:#4ec9b0}std{color}{color:#d4d4d4}::endl;{color} > {color:#c586c0}return{color} > {color:#9cdcfe}err{color}{color:#d4d4d4}.{color}{color:#dcdcaa}GetCode{color}{color:#d4d4d4}();{color} > {color:#d4d4d4} }{color} > {color:#c586c0}return{color} {color:#b5cea8}0{color}{color:#d4d4d4};{color} > 3.server side's log are as follows: > {color:#d4d4d4}[{color}{color:#6a9955}11:25:35,496{color}{color:#d4d4d4}][SEVERE][client-connector-#{color}{color:#569cd6}117{color}{color:#d4d4d4}][ClientListenerNioListener] > Failed to process client request > [req={color}{color:#569cd6}o.a.i.i.processors.platform.client.tx.ClientTxEndRequest{color}{color:#d4d4d4}@569bc2e0]{color} > {color:#d4d4d4}class > {color}{color:#ce9178}org.apache.ignite.internal.processors.platform.client.IgniteClientException{color}{color:#d4d4d4}: > Transaction with id {color}{color:#569cd6}1{color}{color:#d4d4d4} not > found.{color} > {color:#ce9178} at > org.apache.ignite.internal.processors.platform.client.tx.ClientTxEndRequest.process(ClientTxEndRequest.java:59){color} > {color:#ce9178} at > org.apache.ignite.internal.processors.platform.client.ClientRequestHandler.handle(ClientRequestHandler.java:98){color} > {color:#ce9178} at > org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:195){color} > {color:#ce9178} at > org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:49){color} > {color:#ce9178} at > org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279){color} > {color:#ce9178} at > org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109){color} > {color:#ce9178} at > org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97){color} > {color:#ce9178} at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120){color} > {color:#ce9178} at > org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70){color} > {color:#ce9178} at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149){color} > {color:#ce9178} at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624){color} > {color:#ce9178} at java.lang.Thread.run(Thread.java:748){color} > If start two nodes on two hosts and create a cluster, you can reproduce this > problem. If start multiple server nodes on one host, it seems that there is > no problem. > Thin clients only need one. > See the following discussion for details: > http://apache-ignite-users.70518.x6.nabble.com/2-10-branch-cpp-thin-client-transaction-Transaction-with-id-1-not-found-tt35358.html -- This message was sent by Atlassian Jira (v8.3.4#803005)