0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd: Interpose rocksdb::DeleteDBFile() good thru RocksDB v6.8.1.

This commit is contained in:
Jason Volk 2020-05-06 23:38:48 -07:00
parent 0e84f4cb86
commit ddc404d217

View file

@ -46,6 +46,10 @@
#error "RocksDB file_util.h is not available. Cannot interpose bugfixes."
#endif
#if __has_include("file/sst_file_manager_impl.h")
#include "file/sst_file_manager_impl.h"
#endif
///////////////////////////////////////////////////////////////////////////////
//
// https://github.com/facebook/rocksdb/issues/4654. In summary, some RocksDB
@ -183,6 +187,20 @@ rocksdb::DeleteSSTFile(const ImmutableDBOptions *db_options,
}
#endif
#if __has_include("file/file_util.h")
rocksdb::Status
rocksdb::DeleteDBFile(const ImmutableDBOptions *db_options,
const std::string& fname,
const std::string& dir_to_sync,
const bool force_bg,
const bool force_fg)
{
assert(db_options);
assert(db_options->env);
return db_options->env->DeleteFile(fname);
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// On platforms where hardware crc32 acceleration is not available and for