[
https://issues.jboss.org/browse/ISPN-10073?page=com.atlassian.jira.plugin...
]
Dejan Bosanac updated ISPN-10073:
---------------------------------
Description:
We noticed some issued with the HotRod client, when trying to use nested async calls.
Originally, this was discovered in the context of Vert.x tests, but below you can find the
smallest reproducer code that I could create (without any Vert.x dependencies).
{code:java}
//DefaultCacheManager cm = new DefaultCacheManager();
//Cache<String, String> cache = cm.createCache("default", new
ConfigurationBuilder().build());
RemoteCacheManager cm = new RemoteCacheManager();
RemoteCache<String, String> cache = manager.getCache("default");
final CompletableFuture put = new CompletableFuture();
cache.putIfAbsentAsync("A", "A").thenAccept(resultA -> {
final CompletableFuture nested = new CompletableFuture();
cache.putIfAbsentAsync("B", "B").thenAccept(resultB ->
{
nested.complete("B");
});
try {
nested.get();
} catch (Exception e) {
e.printStackTrace();
}
put.complete("B");
});
put.get();
{code}
Everything works as expected with embedded cache.
was:
We noticed some issued with the HotRod client, when trying to use nested async calls.
Originally, this was discovered in the context of Vert.x tests, but below you can find the
smallest reproducer code that I could create (without any Vert.x dependencies).
{{ //DefaultCacheManager cm = new DefaultCacheManager();
//Cache<String, String> cache = cm.createCache("default", new
ConfigurationBuilder().build());
RemoteCacheManager cm = new RemoteCacheManager();
RemoteCache<String, String> cache = manager.getCache("default");
final CompletableFuture put = new CompletableFuture();
cache.putIfAbsentAsync("A", "A").thenAccept(resultA -> {
final CompletableFuture nested = new CompletableFuture();
cache.putIfAbsentAsync("B", "B").thenAccept(resultB ->
{
nested.complete("B");
});
try {
nested.get();
} catch (Exception e) {
e.printStackTrace();
}
put.complete("B");
});
put.get();}}
Everything works as expected with embedded cache.
Nested async operations with HotRod client hang
-----------------------------------------------
Key: ISPN-10073
URL:
https://issues.jboss.org/browse/ISPN-10073
Project: Infinispan
Issue Type: Bug
Components: Hot Rod
Affects Versions: 9.4.10.Final
Reporter: Dejan Bosanac
Priority: Major
We noticed some issued with the HotRod client, when trying to use nested async calls.
Originally, this was discovered in the context of Vert.x tests, but below you can find the
smallest reproducer code that I could create (without any Vert.x dependencies).
{code:java}
//DefaultCacheManager cm = new DefaultCacheManager();
//Cache<String, String> cache = cm.createCache("default", new
ConfigurationBuilder().build());
RemoteCacheManager cm = new RemoteCacheManager();
RemoteCache<String, String> cache = manager.getCache("default");
final CompletableFuture put = new CompletableFuture();
cache.putIfAbsentAsync("A", "A").thenAccept(resultA -> {
final CompletableFuture nested = new CompletableFuture();
cache.putIfAbsentAsync("B", "B").thenAccept(resultB ->
{
nested.complete("B");
});
try {
nested.get();
} catch (Exception e) {
e.printStackTrace();
}
put.complete("B");
});
put.get();
{code}
Everything works as expected with embedded cache.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)