tommyjarvis created IGNITE-6537:
-----------------------------------
Summary: Transactions bug
Key: IGNITE-6537
URL: https://issues.apache.org/jira/browse/IGNITE-6537
Project: Ignite
Issue Type: Bug
Components: examples
Affects Versions: 2.2
Environment: general
Reporter: tommyjarvis
Code:
get ignite:
==============================
org.apache.ignite.configuration.IgniteConfiguration cfg = new
org.apache.ignite.configuration.IgniteConfiguration();
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setLocalPort(48501);
spi.setLocalPortRange(20);
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(serverList);
spi.setIpFinder(ipFinder);
TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
commSpi.setSlowClientQueueLimit(1000);
commSpi.setLocalPort(48101);
cfg.setClientMode(true);
cfg.setDiscoverySpi(spi);
cfg.setCommunicationSpi(commSpi);
cfg.setPeerClassLoadingEnabled(true);
PersistentStoreConfiguration persistentStoreConfiguration = new
PersistentStoreConfiguration();
cfg.setPersistentStoreConfiguration(persistentStoreConfiguration);
ignite = Ignition.start(cfg);
==========================================
transaction like this:
Thread t = new Thread(() -> {
try (Transaction tx = ignite.transactions().txStart()) {
for (int i = 0; i < 1000; i++) {
cache.put(i, i);
}
tx.commit();
}
});
t.start();
//
int lastSize = 0;
while (true) {
int size = cache.size();
// int size = cache2.localSize();
size = cache.query(new ScanQuery<>()).getAll().size();
if (size != lastSize) {
System.out.println(size);
lastSize = size;
}
System.out.println("##################################" + size);
}
i thought only print ###0 and ###1000
but after i run print like this:
163
##################################163
515
##################################515
1000
##################################1000
##################################1000
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)