Add comments/permit unchecked error to close_db_dir pull requests (#10093)

Summary:
In [close_db_dir](https://github.com/facebook/rocksdb/pull/10049) pull request, some merging conflicts occurred (some comments and one line `s.PermitUncheckedError()` are missing). This pull request aims to put them back.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10093

Reviewed By: ajkr

Differential Revision: D36884117

Pulled By: littlepig2013

fbshipit-source-id: 8c0e2a8793fc52804067c511843bd1ff4912c1c3
main
zczhu 3 years ago committed by Facebook GitHub Bot
parent ed50ccd19a
commit e88d8935ae
  1. 2
      db/column_family.cc
  2. 2
      env/io_posix.cc

@ -682,8 +682,10 @@ ColumnFamilyData::~ColumnFamilyData() {
if (data_dir_ptr) {
s = data_dir_ptr->Close(IOOptions(), nullptr);
if (!s.ok()) {
// TODO(zichen): add `Status Close()` and `CloseDirectories()
ROCKS_LOG_WARN(ioptions_.logger, "Ignoring error %s",
s.ToString().c_str());
s.PermitUncheckedError();
}
}
}

2
env/io_posix.cc vendored

@ -1661,6 +1661,8 @@ IOStatus PosixDirectory::Fsync(const IOOptions& opts, IODebugContext* dbg) {
return FsyncWithDirOptions(opts, dbg, DirFsyncOptions());
}
// Users who want the file entries synced in Directory project must call a
// Fsync or FsyncWithDirOptions function before Close
IOStatus PosixDirectory::Close(const IOOptions& /*opts*/,
IODebugContext* /*dbg*/) {
IOStatus s = IOStatus::OK();

Loading…
Cancel
Save