提交 d74f2413 authored 作者: Thomas Mueller's avatar Thomas Mueller

Close database if store is closed (due to out of memory for example)

上级 90358d12
...@@ -1411,6 +1411,7 @@ public class Session extends SessionWithState { ...@@ -1411,6 +1411,7 @@ public class Session extends SessionWithState {
public Transaction getTransaction() { public Transaction getTransaction() {
if (transaction == null) { if (transaction == null) {
if (database.getMvStore().getStore().isClosed()) { if (database.getMvStore().getStore().isClosed()) {
database.shutdownImmediately();
throw DbException.get(ErrorCode.DATABASE_IS_CLOSED); throw DbException.get(ErrorCode.DATABASE_IS_CLOSED);
} }
transaction = database.getMvStore().getTransactionStore().begin(); transaction = database.getMvStore().getTransactionStore().begin();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论