filer: close stores if interrupted

This commit is contained in:
Chris Lu
2020-03-14 20:30:26 -07:00
parent d022b6bc0e
commit 7b37178716
9 changed files with 41 additions and 0 deletions

View File

@@ -236,3 +236,9 @@ func hashToBytes(dir string, dbCount int) ([]byte, int) {
return b, int(x) % dbCount
}
func (store *LevelDB2Store) Shutdown() {
for d := 0; d < store.dbCount; d++ {
store.dbs[d].Close()
}
}