rocksdb/env
Anand Ananthabhotla d0f1b49ab6 Add a Close() method to DB to return status when closing a db
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
2018-01-16 11:08:57 -08:00
..
env_basic_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_chroot.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_chroot.h Change RocksDB License 2017-07-15 16:11:23 -07:00
env_encryption.cc Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00
env_hdfs.cc Add a Close() method to DB to return status when closing a db 2018-01-16 11:08:57 -08:00
env_posix.cc Make writable_file_max_buffer_size dynamic 2017-10-31 13:56:35 -07:00
env_test.cc Fix crashes, address test issues and adjust windows test script 2017-11-10 10:41:57 -08:00
env.cc Add a Close() method to DB to return status when closing a db 2018-01-16 11:08:57 -08:00
io_posix.cc Suppress valgrind "unimplemented functionality" error 2017-11-15 14:28:34 -08:00
io_posix.h Stream 2017-11-10 09:26:24 -08:00
mock_env_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
mock_env.cc Fix unused var warnings in Release mode 2017-10-23 14:27:04 -07:00
mock_env.h Change RocksDB License 2017-07-15 16:11:23 -07:00
posix_logger.h Add a Close() method to DB to return status when closing a db 2018-01-16 11:08:57 -08:00