Skip to content

Commit e22bceb

Browse files
author
Marcelo Vanzin
committed
Close db before throwing version-related exception.
1 parent 429d12e commit e22bceb

File tree

1 file changed

+1
-0
lines changed
  • common/kvstore/src/main/java/org/apache/spark/util/kvstore

1 file changed

+1
-0
lines changed

common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDB.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public LevelDB(File path, KVStoreSerializer serializer) throws Exception {
8383
if (versionData != null) {
8484
long version = serializer.deserializeLong(versionData);
8585
if (version != STORE_VERSION) {
86+
close();
8687
throw new UnsupportedStoreVersionException();
8788
}
8889
} else {

0 commit comments

Comments
 (0)