ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Kulichenko <valentin.kuliche...@gmail.com>
Subject Fwd: LOCAL CACHE MODE Configuration settings
Date Tue, 10 Nov 2015 23:15:51 GMT
Igniters,

While investigating this issue reported by user, I noticed that LOCAL cache
is fully destroyed when close() is called, which is inconsistent with other
cache modes. Is there any reason for this?

-Val

---------- Forwarded message ----------
From: vkulichenko <valentin.kulichenko@gmail.com>
Date: Tue, Nov 10, 2015 at 3:03 PM
Subject: Re: LOCAL CACHE MODE Configuration settings
To: user@ignite.apache.org


This happens because you use try-with-resources statement and therefore
close
the cache after populating it:

try (IgniteCache<String, Object> myCache =
Ignition.ignite().getOrCreateCache("MY_CACHE")) {
    ...
}

Local cache is completely destroyed in this case, while partitioned just
closes the current cache reference. I'm not sure why it's implemented this
way and I will start a discussion on dev@.

But anyway, just avoid closing the cache unless you want to destroy it and
it will work for you.

-Val



--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/LOCAL-CACHE-MODE-Configuration-settings-tp1875p1922.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message