Re[2]: Mixing persistent and in memory cache

2021-02-25 Thread Zhenya Stanilovsky


hi Stephan, something wrong with configuration probably … it`s not expected 
issue.
*  plz attach somehow or send me ignite.log from all server nodes ? 
*  If you change second call :
IgniteCache kva = getInMemoryKeyValue(igA);
 
 IgniteCache kvb = getInMemoryKeyValue(igB); ← here
for something like : IgniteCache kvb = 
getInMemoryKeyValue2(igB);
 
private IgniteCache getInMemoryKeyValue2(Ignite ignite)
 {
 return ignite.cache(new CacheConfiguration() <--- 
 
just to check that cache has been already created.
 
Does ignite.cache will see the previously created cache ?
 
thanks !
 
>Hi Zhenya, thanks for this suggestion.
>
>However, neither setting CacheWriteSynchronizationMode to Full Sync nor
>setting it to FULL_ASYNC changes anything: memory cahce changes do not get
>propagated:
>
>private IgniteCache getInMemoryKeyValue(Ignite ignite)
>{
>return ignite.getOrCreateCache(new CacheConfiguration()
>.setName("memkv")
>.setCacheMode(CacheMode.REPLICATED)
>.setDataRegionName(NodeController.IN_MEMORY_REGION)
>.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
>.setBackups(2));
>}
>
>
>
>
>--
>Sent from:  http://apache-ignite-users.70518.x6.nabble.com/ 
 
 
 
 

RE: Re[2]: Mixing persistent and in memory cache

2021-02-26 Thread Stephan Hesse
Hi Zhenya,

your 2nd point: yes, the cache itself has been propagated.

Please be aware that I have successfully used the same test with only the 
in-memory region as well as with only the persistent region. Only when I 
combine both, the synchronization stops working for the in memory region.


Please find attached the log file (both Ignite nodes run in the same process 
and contribute to this log file) as well as the current Junit test.

In the log file you will find:

The node startup:
>>>> starting node A
>>>> starting node B

The test case startup:
 testMem2

The test stops with:
java.lang.AssertionError: expected: but was:
…
at 
de.dicos.cpcfe.ignite.IgniteClusterTest.testMem2(IgniteClusterTest.java:175)

---
Mit freundlichen Grüßen

Stephan Hesse
Geschäftsführer

DICOS GmbH Kommunikationssysteme
Alsfelder Straße 11, 64289 Darmstadt

Telefon: +49 6151 82787 27, Mobil: +49 1761 82787 27

www.dicos.de<http://www.dicos.de/>

DICOS GmbH Kommunikationssysteme, Darmstadt, Amtsgericht Darmstadt HRB 7024,
Geschäftsführer: Dr. Winfried Geyer, Stephan Hesse, Waldemar Wiesner



From: Zhenya Stanilovsky 
Sent: Friday, February 26, 2021 6:57 AM
To: user@ignite.apache.org
Subject: Re[2]: Mixing persistent and in memory cache


hi Stephan, something wrong with configuration probably … it`s not expected 
issue.

  1.  plz attach somehow or send me ignite.log from all server nodes ?
  2.  If you change second call :
IgniteCache kva = getInMemoryKeyValue(igA);

 IgniteCache kvb = getInMemoryKeyValue(igB); ← here
for something like : IgniteCache kvb = 
getInMemoryKeyValue2(igB);

private IgniteCache getInMemoryKeyValue2(Ignite ignite)
 {
 return ignite.cache(new CacheConfiguration() <---

just to check that cache has been already created.

Does ignite.cache will see the previously created cache ?

thanks !


Hi Zhenya, thanks for this suggestion.

However, neither setting CacheWriteSynchronizationMode to Full Sync nor
setting it to FULL_ASYNC changes anything: memory cahce changes do not get
propagated:

private IgniteCache getInMemoryKeyValue(Ignite ignite)
{
return ignite.getOrCreateCache(new CacheConfiguration()
.setName("memkv")
.setCacheMode(CacheMode.REPLICATED)
.setDataRegionName(NodeController.IN_MEMORY_REGION)
.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
.setBackups(2));
}




--
Sent from: 
http://apache-ignite-users.70518.x6.nabble.com/<https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ignite-users.70518.x6.nabble.com%2F&data=04%7C01%7Cs.hesse%40dicos.de%7Cd789d1f0f4db40a1259208d8da1b5c6b%7Cac9cfe7f98014e47b9fef4a671e0ab36%7C1%7C0%7C637499158770576790%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=5TvORxPKiEU7dSuYaqyyiOI%2Fvg%2FZuXWO0Bncr6ONBnA%3D&reserved=0>






testMem2.log
Description: testMem2.log


IgniteClusterTest.java
Description: IgniteClusterTest.java