You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergey Kozlov (JIRA)" <ji...@apache.org> on 2015/03/19 14:37:38 UTC

[jira] [Updated] (IGNITE-508) Loop of start/stop cache hangs

     [ https://issues.apache.org/jira/browse/IGNITE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Kozlov updated IGNITE-508:
---------------------------------
    Description: 
I modified CachePutGetExample by following way:

{code:title=CachePutGetExample.java|borderStyle=solid}
public static void main(String[] args) throws IgniteException {
    try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {

        CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();

        cfg.setCacheMode(CacheMode.PARTITIONED);
        cfg.setName(CACHE_NAME);

        for (int i=0; i < 1000; i++) {
            System.out.println("Iteration " + Integer.toString(i));
            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
                // Individual puts and gets.
                putGet(cache);

                // Bulk puts and gets.
                putAllGetAll(cache);
            }
        }
    }
}
{code}

1. Start ExampleNodeStartup and wait until topology update.
2. Start modified CachePutGetExample

Now example hangs and print out warnings:
{noformat}
[16:27:38,230][WARN ][grid-timeout-worker-#33%null%][GridDhtPartitionsExchangeFuture] Retrying preload partition exchange due to timeout [done=false, dummy=false, exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=159], nodeId=7387a0fd, evt=DISCOVERY_CUSTOM_EVT], rcvdIds=[], rmtIds=[9e571dc5], remaining=[9e571dc5], init=true, initFut=true, ready=true, replied=false, added=true, oldest=9e571dc5, oldestOrder=1, evtLatch=0, locNodeOrder=2, locNodeId=7387a0fd-52a5-4d48-9c0e-1972f95bdf83]
{noformat}

See more details in attached files

  was:
I modified CachePutGetExample by following way:

{code:title=CachePutGetExample.java|borderStyle=solid}
public static void main(String[] args) throws IgniteException {
    try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {

        CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();

        cfg.setCacheMode(CacheMode.PARTITIONED);
        cfg.setName(CACHE_NAME);

        for (int i=0; i < 1000; i++) {
            System.out.println("Iteration " + Integer.toString(i));
            try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
                // Individual puts and gets.
                putGet(cache);

                // Bulk puts and gets.
                putAllGetAll(cache);
            }
        }
    }
}
{code}

The example fails after at iteration 272:
{noformat}
Iteration 273
[22:41:41,998][INFO ][exchange-worker-#49%null%][GridCacheProcessor] Started cache [name=CachePutGetExample, mode=PARTITIONED]
[22:41:42,091][INFO ][exchange-worker-#49%null%][GridDhtPreloader] <CachePutGetExample> Starting rebalancing in ASYNC mode: CachePutGetExample

>>> Cache put-get example started.
>>> Stored values in cache.
Got [key=0, val=0]

>>> Starting putAll-getAll example.
>>> Bulk-stored values in cache.
Got entry [key=0, val=bulk-0]
[22:41:42,093][INFO ][preloader-demand-worker-#1434%null%][GridDhtPreloader] <CachePutGetExample> Completed rebalancing in ASYNC mode [cache=CachePutGetExample, time=0 ms]
[22:41:42,096][INFO ][exchange-worker-#49%null%][GridCacheProcessor] Stopped cache: CachePutGetExample
Iteration 274
[22:41:42,104][INFO ][main][GridTcpRestProtocol] Command protocol successfully stopped: TCP binary
[22:41:42,132][INFO ][main][GridCacheProcessor] Stopped cache: ignite-marshaller-sys-cache
[22:41:42,132][INFO ][main][GridCacheProcessor] Stopped cache: ignite-sys-cache
[22:41:42,132][INFO ][main][GridCacheProcessor] Stopped cache: ignite-atomics-sys-cache
[22:41:42,139][INFO ][main][IgniteKernal] 

>>> +----------------------------------------------------------------------------------------------+
>>> Ignite ver. 1.0.0-RC3-SNAPSHOT#20150318-sha1:8c082029ab28b08402c0c8663fc90b8497315a5d stopped OK
>>> +----------------------------------------------------------------------------------------------+
>>> Grid name: null
>>> Grid uptime: 00:00:16:163


Exception in thread "main" javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Failed to start cache (a cache with the same name is already being started or stopped): CachePutGetExample
	at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1812)
	at org.apache.ignite.internal.IgniteKernal.createCache(IgniteKernal.java:2265)
	at org.apache.ignite.examples.datagrid.CachePutGetExample.main(CachePutGetExample.java:56)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start cache (a cache with the same name is already being started or stopped): CachePutGetExample
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.initiateCacheChanges(GridCacheProcessor.java:1631)
	at org.apache.ignite.internal.processors.cache.GridCacheProcessor.dynamicStartCache(GridCacheProcessor.java:1582)
	at org.apache.ignite.internal.IgniteKernal.createCache(IgniteKernal.java:2260)
	... 6 more

Process finished with exit code 1
{noformat}

        Summary: Loop of start/stop cache hangs  (was: Loop of start/stop cache fails)

> Loop of start/stop cache hangs
> ------------------------------
>
>                 Key: IGNITE-508
>                 URL: https://issues.apache.org/jira/browse/IGNITE-508
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: sprint-2
>            Reporter: Sergey Kozlov
>            Assignee: Alexey Goncharuk
>             Fix For: sprint-3
>
>
> I modified CachePutGetExample by following way:
> {code:title=CachePutGetExample.java|borderStyle=solid}
> public static void main(String[] args) throws IgniteException {
>     try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
>         CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>();
>         cfg.setCacheMode(CacheMode.PARTITIONED);
>         cfg.setName(CACHE_NAME);
>         for (int i=0; i < 1000; i++) {
>             System.out.println("Iteration " + Integer.toString(i));
>             try (IgniteCache<Integer, String> cache = ignite.createCache(cfg)) {
>                 // Individual puts and gets.
>                 putGet(cache);
>                 // Bulk puts and gets.
>                 putAllGetAll(cache);
>             }
>         }
>     }
> }
> {code}
> 1. Start ExampleNodeStartup and wait until topology update.
> 2. Start modified CachePutGetExample
> Now example hangs and print out warnings:
> {noformat}
> [16:27:38,230][WARN ][grid-timeout-worker-#33%null%][GridDhtPartitionsExchangeFuture] Retrying preload partition exchange due to timeout [done=false, dummy=false, exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=2, minorTopVer=159], nodeId=7387a0fd, evt=DISCOVERY_CUSTOM_EVT], rcvdIds=[], rmtIds=[9e571dc5], remaining=[9e571dc5], init=true, initFut=true, ready=true, replied=false, added=true, oldest=9e571dc5, oldestOrder=1, evtLatch=0, locNodeOrder=2, locNodeId=7387a0fd-52a5-4d48-9c0e-1972f95bdf83]
> {noformat}
> See more details in attached files



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)