提交 de5c1686 编写于 作者: V Vlad Ilyushchenko

CAIRO: bugfix - writer pool could leave pool entry in inconsistent state when lock fails.

上级 e7aaf7a1
......@@ -175,7 +175,12 @@ public class WriterPool extends AbstractPool implements ResourcePool<TableWriter
e = new Entry(clock.getTicks());
Entry other = entries.putIfAbsent(tableName, e);
if (other == null) {
return lockAndNotify(thread, e, tableName);
if (lockAndNotify(thread, e, tableName)) {
return true;
} else {
entries.remove(tableName);
return false;
}
} else {
e = other;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册