ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alisher Alimov <alimovalis...@gmail.com>
Subject CacheStore and Transaction
Date Sun, 19 Mar 2017 19:32:31 GMT
Hello!

I found bug when using CacheStore with Transaction or it’s expected behaviour?

Example:

CacheConfiguration cacheConfiguration = new CacheConfiguration("test.no-op");
cacheConfiguration.setWriteThrough(true);
cacheConfiguration.setCacheWriterFactory(noOpCacheWriterFactory);
cacheConfiguration.setWriteBehindBatchSize(1);

try (Transaction transaction = ignite.transactions().txStart()) {
    cache.put(1, 1); // will be flushed here
    cache.put(2, 2);

    transaction.rollback();
}

Does not matter if transaction was not completed or rollback, dirty records are flushed through
CacheWriter and persistent storage will contains inconsistent data.

Expected behaviour: only committed data must be flushed


With best regards
Alisher Alimov
alimovalisher@gmail.com





Mime
View raw message