Update _rocksdb.pyx
This commit is contained in:
parent
4bc9039ccc
commit
3f4e75f119
1 changed files with 1 additions and 4 deletions
|
@ -1725,14 +1725,11 @@ cdef class DB(object):
|
||||||
|
|
||||||
def close(self, safe=True):
|
def close(self, safe=True):
|
||||||
cdef ColumnFamilyOptions copts
|
cdef ColumnFamilyOptions copts
|
||||||
# -- iFA88 --
|
|
||||||
cdef cpp_bool c_safe = safe
|
cdef cpp_bool c_safe = safe
|
||||||
if self.db != NULL:
|
if hasattr(self, "db"):
|
||||||
# -- iFA88 -- <<
|
|
||||||
# We need stop backround compactions
|
# We need stop backround compactions
|
||||||
with nogil:
|
with nogil:
|
||||||
db.CancelAllBackgroundWork(self.db, c_safe)
|
db.CancelAllBackgroundWork(self.db, c_safe)
|
||||||
# -- iFA88 -- >>
|
|
||||||
# We have to make sure we delete the handles so rocksdb doesn't
|
# We have to make sure we delete the handles so rocksdb doesn't
|
||||||
# assert when we delete the db
|
# assert when we delete the db
|
||||||
del self.cf_handles[:]
|
del self.cf_handles[:]
|
||||||
|
|
Loading…
Reference in a new issue