You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Aat <as...@gmail.com> on 2019/03/08 08:18:20 UTC

cache is moved to a read-only state

Hello, after 5 minutes i have this exception :

2541 javax.cache.CacheException: class
org.apache.ignite.IgniteCheckedException: Failed to write to cache (cache is
moved to a read-only state): marketData
   2542         at
org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1337)
   2543         at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.cacheException(IgniteCacheProxyImpl.java:1758)
   2544         at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.putAll(IgniteCacheProxyImpl.java:1171)
   2545         at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.putAll(GatewayProtectedCacheProxy.java:868)
   2546         at
com.socgen.folab.applications.qpw.domain.processor.RtMarketDataContainer.dispatchToCache(RtMarketDataContainer.java:243)
   2547         at
com.socgen.folab.applications.qpw.domain.processor.RtMarketDataContainer$3.run(RtMarketDataContainer.java:179)
   2548         at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   2549         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   2550         at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   2551         at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   2552         at java.lang.Thread.run(Thread.java:748)
   2553 Caused by: org.apache.ignite.IgniteCheckedException: Failed to write
to cache (cache is moved to a read-only state): marketData


Thank for your help;
__




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: cache is moved to a read-only state

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

You can't change config, since cache is started its config cannot be
changed.

Can you share logs from all nodes?

Regards,
-- 
Ilya Kasnacheev


пн, 11 мар. 2019 г. в 13:11, Aat <as...@gmail.com>:

> No - All my servers was available.
> I change cache config.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: cache is moved to a read-only state

Posted by Aat <as...@gmail.com>.
No - All my servers was available.
I change cache config.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: cache is moved to a read-only state

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

As far as I can see this should happen if you lose two server nodes at the
same time. Did this happen?

Regards,
-- 
Ilya Kasnacheev


пт, 8 мар. 2019 г. в 18:46, Aat <as...@gmail.com>:

> visor> cache -slp -c=marketData
> Lost partitions for cache: marketData (12)
> +=============================================================+
> | Interval |                    Partitions                    |
> +=============================================================+
> | 86-816   | 86, 115, 241, 469, 632, 677, 719, 781, 791, 816, |
> | 892-1014 | 892, 1014                                        |
> +-------------------------------------------------------------+
> visor>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: cache is moved to a read-only state

Posted by Aat <as...@gmail.com>.
visor> cache -slp -c=marketData
Lost partitions for cache: marketData (12)
+=============================================================+
| Interval |                    Partitions                    |
+=============================================================+
| 86-816   | 86, 115, 241, 469, 632, 677, 719, 781, 791, 816, |
| 892-1014 | 892, 1014                                        |
+-------------------------------------------------------------+
visor>




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: cache is moved to a read-only state

Posted by Aat <as...@gmail.com>.
from git :


 PartitionLossPolicy partLossPlc = grp.config().getPartitionLossPolicy();

        if (grp.needsRecovery() && !recovery) {
            if (!read && (partLossPlc == READ_ONLY_SAFE || partLossPlc ==
READ_ONLY_ALL))
                return new IgniteCheckedException("Failed to write to cache
(cache is moved to a read-only state): " +
                    cctx.name());
        }

and in my config i setted : 
   .setPartitionLossPolicy(READ_ONLY_ALL)
         

/**
     * All writes to the cache will be failed with an exception. All reads
will proceed as if all partitions
     * were in a consistent state. The result of reading from a lost
partition is undefined and may be different
     * on different nodes in the cluster.
     */
    READ_ONLY_ALL,


What's the best configuration ?

IGNORE ?

i m going to test






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: cache is moved to a read-only state

Posted by Aat <as...@gmail.com>.
my MarketData services is splitted into four publishers : who put values in
the same cache.
Maybe Cache does not support concurrency write ?
__

public class CacheConfig<K, V> extends CacheConfiguration<K, V> {

        setCacheMode(CacheMode.PARTITIONED);
        setGroupName("quotationFeed");

        setStoreByValue(false)
            .setWriteThrough(false)
            .setReadThrough(false)

            .setBackups(1)
            .setPartitionLossPolicy(READ_ONLY_ALL)
            .setWriteSynchronizationMode(PRIMARY_SYNC)

            .setRebalanceMode(CacheRebalanceMode.SYNC)
            .setRebalanceThrottle(100)
            .setRebalanceBatchSize(2* 1024*1024)

            .setStatisticsEnabled(true)
            .setManagementEnabled(true);

        return this;
    }
}
__
etPair(BELDER, B.KBC9M6000C)]
      2 javax.cache.CacheException: class
org.apache.ignite.IgniteCheckedException: Failed to write to cache (cache is
moved to a read-only state): marketData
      3         at
org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1337)
      4         at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.cacheException(IgniteCacheProxyImpl.java:1758)
      5         at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.putAll(IgniteCacheProxyImpl.java:1171)
      6         at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.putAll(GatewayProtectedCacheProxy.java:868)
      7         at
com.socgen.folab.applications.qpw.domain.processor.RtMarketDataContainer.dispatchToCache(RtMarketDataContainer.java:243)
      8         at
com.socgen.folab.applications.qpw.domain.processor.RtMarketDataContainer$3.run(RtMarketDataContainer.java:179)
      9         at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
     10         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     11         at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
     12         at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
     13         at java.lang.Thread.run(Thread.java:748)
     14 Caused by: org.apache.ignite.IgniteCheckedException: Failed to write
to cache (cache is moved to a read-only state): marketData
     15         at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTopologyFutureAdapter.validateCache(GridDhtTopologyFutureAdapter.java:97)
     16         at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.mapOnTopology(GridNearAtomicUpdateFuture.java:638)
     17         at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.map(GridNearAtomicAbstractUpdateFuture.java:248)
     18         at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAll0(GridDhtAtomicCache.java:1105)
     19         at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putAll0(GridDhtAtomicCache.java:653)
     20         at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAll(GridCacheAdapter.java:2932)
     21         at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.putAll(IgniteCacheProxyImpl.java:1168)
     22         ... 8 common frames omitted
__
I tried Stream package but i get another issue ( stream close )...

Comment : On service flush these message and the other continue to publish.

any idea ?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/