implement leveldb reopen