Skip to content

Commit

Permalink
Fixed bug on index closing
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Jun 19, 2013
1 parent 04fc345 commit c510987
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,14 @@ public void unload() {
root = null;

final ODatabaseRecord db = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined();
if (db != null && !db.isClosed())
if (db != null && !db.isClosed()) {
// RELOAD IT
load();
try {
load();
} catch (Exception e) {
// IGNORE IT
}
}

} catch (Exception e) {
OLogManager.instance().error(this, "Error on unload the tree: " + dataProvider, e, OStorageException.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ public void testexpandBlankDatabase() throws IOException {
database.removeVertex(playerDoc);
database.removeVertex(teamDoc);

ODatabaseHelper.deleteDatabase(database);
database.close();
ODatabaseHelper.deleteDatabase(database);
}

//
Expand Down

0 comments on commit c510987

Please sign in to comment.