#1235 - Thread deadlock on L2 cache load of many property

This commit is contained in:
Rob Bygrave
2018-01-09 23:16:35 +13:00
parent 0d4c50e19c
commit bb205ced54
@@ -211,8 +211,14 @@ public class DLoadManyContext extends DLoadBaseContext implements LoadManyContex
BeanDescriptor<?> parentDesc = context.desc.getBeanDescriptor(ownerBean.getClass());
Object parentId = parentDesc.getId(ownerBean);
if (parentDesc.cacheManyPropLoad(context.property, bc, parentId, context.parent.isReadOnly())) {
// we loaded the bean from cache
list.remove(bc);
// we loaded the bean collection from cache so remove it from the buffer
for (int i = 0; i < list.size(); i++) {
// find it using instance equality - avoiding equals() and potential deadlock issue
if (list.get(i) == bc) {
list.remove(i);
return;
}
}
return;
}
}