mirror of https://github.com/facebook/rocksdb.git
d0f1b49ab6
Summary: Currently, the only way to close an open DB is to destroy the DB object. There is no way for the caller to know the status. In one instance, the destructor encountered an error due to failure to close a log file on HDFS. In order to prevent silent failures, we add DB::Close() that calls CloseImpl() which must be implemented by its descendants. The main failure point in the destructor is closing the log file. This patch also adds a Close() entry point to Logger in order to get status. When DBOptions::info_log is allocated and owned by the DBImpl, it is explicitly closed by DBImpl::CloseImpl(). Closes https://github.com/facebook/rocksdb/pull/3348 Differential Revision: D6698158 Pulled By: anand1976 fbshipit-source-id: 9468e2892553eb09c4c41b8723f590c0dbd8ab7d |
||
---|---|---|
.. | ||
env.cc | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption.cc | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
io_posix.cc | ||
io_posix.h | ||
mock_env.cc | ||
mock_env.h | ||
mock_env_test.cc | ||
posix_logger.h |