IGNITE-5227: StackOverflowError in GridCacheMapEntry#checkOwnerChanged()

2017-05-16 Thread Mikhail Cherkasov
Hi all,

I'll take IGNITE-5227 as a first ticket if you don't mind.


-- 
Thanks,
Mikhail.


[jira] [Created] (IGNITE-5227) StackOverflowError in GridCacheMapEntry#checkOwnerChanged()

2017-05-15 Thread Alexey Goncharuk (JIRA)
Alexey Goncharuk created IGNITE-5227:


 Summary: StackOverflowError in 
GridCacheMapEntry#checkOwnerChanged()
 Key: IGNITE-5227
 URL: https://issues.apache.org/jira/browse/IGNITE-5227
 Project: Ignite
  Issue Type: Bug
Affects Versions: 1.6
Reporter: Alexey Goncharuk
Priority: Critical
 Fix For: 2.1


A simple test reproducing this error:
{code}
/**
 * @throws Exception if failed.
 */
public void testBatchUnlock() throws Exception {
startGrid(0);

try {
final CountDownLatch releaseLatch = new CountDownLatch(1);

IgniteInternalFuture fut = GridTestUtils.runAsync(new 
Callable() {
@Override public Object call() throws Exception {
IgniteCache<Object, Object> cache = grid(0).cache(null);

Lock lock = cache.lock("key");

try {
lock.lock();

releaseLatch.await();
}
finally {
lock.unlock();
}

return null;
}
});

Map<String, String> putMap = new LinkedHashMap<>();

putMap.put("key", "trigger");

for (int i = 0; i < 10_000; i++)
putMap.put("key-" + i, "value");

IgniteCache<Object, Object> asyncCache = 
grid(0).cache(null).withAsync();

asyncCache.putAll(putMap);

IgniteFuture resFut = asyncCache.future();

Thread.sleep(1000);

releaseLatch.countDown();

fut.get();

resFut.get();
}
finally {
stopAllGrids();
}
{code}
We should replace a recursive call with a simple iteration over the linked list.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)