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:
parent
0e84f4cb86
commit
ddc404d217
1 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue