Hi Igor,
1.The actual test environment uses static IP address directly.
2.Three IP addresses are specified as follows:
cfg.SetEndPoints("172.16.100.71,172.16.100.72,172.16.100.73");
在 2021/2/4 下午7:40, Igor Sapego 写道:
Thanks,
I've a few more questions, just to be clear:
1. Are servers behind NAT or some kind of balancer, or do they have
distinct static IP addresses?
2. Do you specify all servers addresses in
cfg.SetEndPoints("X.X.X.X");, or only one?
Best Regards,
Igor
On Thu, Feb 4, 2021 at 4:47 AM 18624049226 <[email protected]
<mailto:[email protected]>> wrote:
Hello Igor,
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.
在 2021/2/3 下午10:02, Igor Sapego 写道:
Hi, I've tried to reproduce an issue you described and could not
reproduce it.
Can you share more details? How many nodes do you run? How many
clients
are run? Do you run any other operations in parallel?
Best Regards,
Igor
On Wed, Feb 3, 2021 at 3:00 PM 18624049226 <[email protected]
<mailto:[email protected]>> wrote:
Hi team,
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 a node use the following config file:
<?xmlversion="1.0"encoding="UTF-8"?>
<beansxmlns="http://www.springframework.org/schema/beans"
<http://www.springframework.org/schema/beans>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<http://www.w3.org/2001/XMLSchema-instance>
xsi:schemaLocation="
http://www.springframework.org/schema/beans
<http://www.springframework.org/schema/beans>
http://www.springframework.org/schema/beans/spring-beans.xsd
<http://www.springframework.org/schema/beans/spring-beans.xsd>">
<beanid="grid.cfg"class="org.apache.ignite.configuration.IgniteConfiguration">
<propertyname="clientMode"value="false"/>
<propertyname="peerClassLoadingEnabled"value="true"/>
<propertyname="binaryConfiguration">
<beanclass="org.apache.ignite.configuration.BinaryConfiguration">
<propertyname="compactFooter"value="false"/>
<propertyname="idMapper">
<beanclass="org.apache.ignite.binary.BinaryBasicIdMapper">
<propertyname="lowerCase"value="true"/>
</bean>
</property>
</bean>
</property>
<propertyname="dataStorageConfiguration">
<beanclass="org.apache.ignite.configuration.DataStorageConfiguration">
<propertyname="defaultDataRegionConfiguration">
<beanclass="org.apache.ignite.configuration.DataRegionConfiguration">
<propertyname="name"value="default"/>
<propertyname="maxSize"value="#{1L * 1024 * 1024 * 1024}"/>
<propertyname="persistenceEnabled"value="false"/>
</bean>
</property>
</bean>
</property>
</bean>
</beans>
2.test code are as follows:
Usually only the first few loop operations may throw an
exception, and the subsequent operations are normal.
#include<stdint.h>
#include<iostream>
#include<ignite/thin/ignite_client.h>
#include<ignite/thin/cache/cache_client.h>
#include"ignite/examples/organization.h"
usingnamespaceignite;
usingnamespacethin;
usingnamespacecache;
usingnamespaceexamples;
intmain()
{
IgniteClientConfiguration cfg;
cfg.SetEndPoints("X.X.X.X");
try
{
IgniteClient client = IgniteClient::Start(cfg);
CacheClient<int32_t, Organization> cache =
client.GetOrCreateCache<int32_t, Organization>("PutGetExample");
cache.Clear();
intloop = 100;
for(inti = 0; i < loop; i++)
{
ignite::thin::transactions::ClientTransaction transaction =
client.ClientTransactions().TxStart();
Organization org("Microsoft", Address("1096 Eddy Street, San
Francisco, CA", i));
cache.Put(1, org);
transaction.Commit();
}
Organization orgFromCache = cache.Get(1);
}
catch(IgniteError& err)
{
std::cout << "An error occurred: "<< err.GetText() << std::endl;
returnerr.GetCode();
}
return0;
}
3.server side's log are as follows:
[11:25:35,496][SEVERE][client-connector-#117][ClientListenerNioListener]
Failed to process client request
[req=o.a.i.i.processors.platform.client.tx.ClientTxEndRequest@569bc2e0]
class
org.apache.ignite.internal.processors.platform.client.IgniteClientException:
Transaction with id 1not found.
at
org.apache.ignite.internal.processors.platform.client.tx.ClientTxEndRequest.process(ClientTxEndRequest.java:59)
at
org.apache.ignite.internal.processors.platform.client.ClientRequestHandler.handle(ClientRequestHandler.java:98)
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:195)
at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:49)
at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
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)