[jira] [Comment Edited] (IGNITE-2766) Cache instance is closed when client disconnects

2018-04-17 Thread Maxim Muzafarov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441208#comment-16441208
 ] 

Maxim Muzafarov edited comment on IGNITE-2766 at 4/17/18 5:23 PM:
--

[~ilyak], [~dpavlov]

Due to changes of this issue, we've broked muted flaky test. I've created JIRA 
for fixing it.
 Please, see my changes an PR with my small fix
 https://issues.apache.org/jira/browse/IGNITE-8301


was (Author: mmuzaf):
[~ilyak], [~dpavlov]

Due to changes of this issue, we've broked muted test. I've created JIRA for 
fixing it.
 Please, see my changes an PR with my small fix
 https://issues.apache.org/jira/browse/IGNITE-8301

> Cache instance is closed when client disconnects
> 
>
> Key: IGNITE-2766
> URL: https://issues.apache.org/jira/browse/IGNITE-2766
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 1.5.0.final
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
>Priority: Major
> Fix For: 2.5
>
>
> In case client disconnects and reconnects after network timeout (i.e., with a 
> new ID), all cache instances acquired by this client are closed and are not 
> functional. User has to create a special logic to handle this case.
> Cache proxy should be able to handle this automatically.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (IGNITE-2766) Cache instance is closed when client disconnects

2018-01-19 Thread Ilya Kasnacheev (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16331987#comment-16331987
 ] 

Ilya Kasnacheev edited comment on IGNITE-2766 at 1/19/18 9:28 AM:
--

No, I still don't get it.

-New Ignite cluster just doesn't have the 'TEST' cache.-

Even if it did, it would be a different cache (if not for persistence). 
Eventually with a different cache config. I will try to update the test with a 
working example.


was (Author: ilyak):
No, I still don't get it.

New Ignite cluster just doesn't have the 'TEST' cache.

Even if it did, it would be a different cache (if not for persistence). 
Eventually with a different cache config. I will try to update the test with a 
working example.

> Cache instance is closed when client disconnects
> 
>
> Key: IGNITE-2766
> URL: https://issues.apache.org/jira/browse/IGNITE-2766
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 1.5.0.final
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
>Priority: Major
>
> In case client disconnects and reconnects after network timeout (i.e., with a 
> new ID), all cache instances acquired by this client are closed and are not 
> functional. User has to create a special logic to handle this case.
> Cache proxy should be able to handle this automatically.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (IGNITE-2766) Cache instance is closed when client disconnects

2018-01-18 Thread Mikhail Cherkasov (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16331514#comment-16331514
 ] 

Mikhail Cherkasov edited comment on IGNITE-2766 at 1/19/18 12:40 AM:
-

I can reproduce the issue with the following test:

 
{code:java}
import java.util.Arrays;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.jetbrains.annotations.NotNull;

public class ReconnectClient {
private static int id;

public static void main(String[] args) throws InterruptedException {
Ignition.setClientMode(false);

Ignite server = Ignition.start(getConfiguration());

Ignition.setClientMode(true);
Ignite client = Ignition.start(getConfiguration());

IgniteCache cache = client.cache("TEST");

cache.put("Hello", "World");

server.close();

Thread.sleep(2_000);

Ignition.setClientMode(false);
server = Ignition.start(getConfiguration());

Thread.sleep(4_000);

System.out.println(cache.get("Hello"));
cache.put("Ping", "Pong");

System.out.println("DONE");
}

@NotNull private static IgniteConfiguration getConfiguration() {
IgniteConfiguration cfg = new IgniteConfiguration();

TcpDiscoveryVmIpFinder finder = new TcpDiscoveryVmIpFinder(true);
finder.setAddresses(Arrays.asList("localhost:47500..47600"));

cfg.setIgniteInstanceName("test" + id++);

cfg.setCacheConfiguration(new CacheConfiguration("TEST"));

cfg.setDiscoverySpi( new TcpDiscoverySpi().setIpFinder(finder));
return cfg;
}
}
{code}
 


was (Author: mcherkasov):
I can reproduce the issue with the following test:

 
{code:java}
package multiplan;

import java.util.Arrays;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.jetbrains.annotations.NotNull;

public class ReconnectClient {
private static int id;

public static void main(String[] args) throws InterruptedException {
Ignition.setClientMode(false);

Ignite server = Ignition.start(getConfiguration());

Ignition.setClientMode(true);
Ignite client = Ignition.start(getConfiguration());

IgniteCache cache = client.cache("TEST");

cache.put("Hello", "World");

server.close();

Thread.sleep(2_000);

Ignition.setClientMode(false);
server = Ignition.start(getConfiguration());

Thread.sleep(4_000);

System.out.println(cache.get("Hello"));
cache.put("Ping", "Pong");

System.out.println("DONE");
}

@NotNull private static IgniteConfiguration getConfiguration() {
IgniteConfiguration cfg = new IgniteConfiguration();

TcpDiscoveryVmIpFinder finder = new TcpDiscoveryVmIpFinder(true);
finder.setAddresses(Arrays.asList("localhost:47500..47600"));

cfg.setIgniteInstanceName("test" + id++);

cfg.setCacheConfiguration(new CacheConfiguration("TEST"));

cfg.setDiscoverySpi( new TcpDiscoverySpi().setIpFinder(finder));
return cfg;
}
}
{code}
 

> Cache instance is closed when client disconnects
> 
>
> Key: IGNITE-2766
> URL: https://issues.apache.org/jira/browse/IGNITE-2766
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 1.5.0.final
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
>Priority: Major
>
> In case client disconnects and reconnects after network timeout (i.e., with a 
> new ID), all cache instances acquired by this client are closed and are not 
> functional. User has to create a special logic to handle this case.
> Cache proxy should be able to handle this automatically.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)