QueryProcessor.getOwnTask and freeScheduling not working correctly when opening model browser
When expanding model browser QueryProcessor.getOwnTask
gets called many times and queue in freeScheduling
increases too much.
int i = 0;
public SessionTask getOwnTask(ReadGraphImpl impl) {
System.err.println("getOwnTask " + impl +" " + i++ + " " + freeScheduling.size());
if (freeScheduling.size() > 100) {
System.out.println("oh no");
}
Set<ReadGraphImpl> ancestors = impl.ancestorSet();
synchronized(querySupportLock) {
int index = 0;
while(index < freeScheduling.size()) {
SessionTask task = freeScheduling.get(index);
if(task.hasCommonParent(ancestors)) {
return freeScheduling.remove(index);
}
index++;
}
}
return null;
}