mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::db: RocksDB to 5.12.2.
This commit is contained in:
parent
ecf0efa7be
commit
1268d90fb0
7 changed files with 23 additions and 13 deletions
|
@ -847,7 +847,7 @@ AC_HELP_STRING([--with-included-rocksdb[[[=shared]]]], [Use the RocksDB sources
|
|||
AC_MSG_RESULT([yes])
|
||||
rocksdb_linkage="shared_lib"
|
||||
AC_MSG_NOTICE([Shared RocksDB linkage requires running charybdis with an intact build directory])
|
||||
ROCKSDB_LDFLAGS+=" -Wl,-rpath=$PWD/deps/rocksdb/"
|
||||
ROCKSDB_LDFLAGS+=" -Wl,-rpath=$PWD/deps/rocksdb"
|
||||
AC_SUBST(ROCKSDB_LIBS, ["-lrocksdb"])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
@ -857,7 +857,7 @@ AC_HELP_STRING([--with-included-rocksdb[[[=shared]]]], [Use the RocksDB sources
|
|||
AC_SUBST(ROCKSDB_LIBS, ["$PWD/deps/rocksdb/librocksdb.a"])
|
||||
fi
|
||||
|
||||
bash tools/buildrocks.sh $rocksdb_linkage
|
||||
bash tools/buildrocks.sh $rocksdb_linkage "v5.12.2"
|
||||
AS_IF([ test $? != 0 ],
|
||||
[
|
||||
AC_MSG_ERROR([Failed to build RocksDB])
|
||||
|
|
2
deps/rocksdb
vendored
2
deps/rocksdb
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 7f5f0e0c03d20f84653a991de324810d16a33822
|
||||
Subproject commit 8969445642039566214d650cc6614849e7dd5e17
|
|
@ -24,7 +24,7 @@ namespace ircd::db
|
|||
// Property information interface
|
||||
using prop_int = uint64_t;
|
||||
using prop_str = std::string;
|
||||
using prop_map = std::map<std::string, double>;
|
||||
using prop_map = std::map<std::string, std::string>;
|
||||
template<class R = prop_int> R property(const database &, const string_view &name);
|
||||
template<> prop_int property(const database &, const string_view &name);
|
||||
|
||||
|
|
1
include/ircd/db/database/env/env.h
vendored
1
include/ircd/db/database/env/env.h
vendored
|
@ -84,6 +84,7 @@ struct ircd::db::database::env final
|
|||
Status GetThreadList(std::vector<ThreadStatus>* thread_list) noexcept override;
|
||||
ThreadStatusUpdater* GetThreadStatusUpdater() const noexcept override;
|
||||
uint64_t GetThreadID() const noexcept override;
|
||||
int GetBackgroundThreads(Priority pri) noexcept override;
|
||||
|
||||
env(database *const &d);
|
||||
~env() noexcept;
|
||||
|
|
|
@ -38,7 +38,7 @@ AM_LDFLAGS = \
|
|||
-Wl,--icf=all \
|
||||
-Wl,-z -Wl,now \
|
||||
$(PLATFORM_LDFLAGS) \
|
||||
# -Wl,--no-undefined \
|
||||
-Wl,--no-undefined \
|
||||
###
|
||||
|
||||
libircd_LTLIBRARIES = libircd.la
|
||||
|
|
18
ircd/db.cc
18
ircd/db.cc
|
@ -1085,8 +1085,14 @@ catch(const std::exception &e)
|
|||
void
|
||||
ircd::db::log_rdb_perf_context(const bool &all)
|
||||
{
|
||||
const auto pc
|
||||
{
|
||||
rocksdb::get_perf_context()
|
||||
};
|
||||
|
||||
assert(pc);
|
||||
const bool exclude_zeros(!all);
|
||||
log.debug("%s", rocksdb::perf_context.ToString(exclude_zeros));
|
||||
log.debug("%s", pc->ToString(exclude_zeros));
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
@ -1740,6 +1746,13 @@ const noexcept
|
|||
return defaults.GetThreadID();
|
||||
}
|
||||
|
||||
int
|
||||
ircd::db::database::env::GetBackgroundThreads(Priority pri)
|
||||
noexcept
|
||||
{
|
||||
return defaults.GetBackgroundThreads(pri);
|
||||
}
|
||||
|
||||
//
|
||||
// writable_file
|
||||
//
|
||||
|
@ -3670,7 +3683,7 @@ ircd::db::prop_map
|
|||
ircd::db::property(const column &column,
|
||||
const string_view &name)
|
||||
{
|
||||
std::map<std::string, double> ret;
|
||||
std::map<std::string, std::string> ret;
|
||||
database::column &c(const_cast<db::column &>(column));
|
||||
database &d(const_cast<db::column &>(column));
|
||||
d.d->GetMapProperty(c, slice(name), &ret);
|
||||
|
@ -5191,6 +5204,7 @@ ircd::db::reflect(const rocksdb::Env::Priority &p)
|
|||
{
|
||||
switch(p)
|
||||
{
|
||||
case rocksdb::Env::Priority::BOTTOM: return "BOTTOM"_sv;
|
||||
case rocksdb::Env::Priority::LOW: return "LOW"_sv;
|
||||
case rocksdb::Env::Priority::HIGH: return "HIGH"_sv;
|
||||
case rocksdb::Env::Priority::TOTAL: return "TOTAL"_sv;
|
||||
|
|
|
@ -10,11 +10,6 @@ if [ -z $BRANCH ]; then
|
|||
BRANCH="master"
|
||||
fi
|
||||
|
||||
JOBS=$3
|
||||
if [ -z $JOBS ]; then
|
||||
JOBS=4
|
||||
fi
|
||||
|
||||
run ()
|
||||
{
|
||||
COMMAND=$1
|
||||
|
@ -53,5 +48,5 @@ run git submodule update --init deps/rocksdb
|
|||
|
||||
run cd deps/rocksdb
|
||||
run git checkout $BRANCH
|
||||
CFLAGS=-fPIC run make -j$JOBS $LINKAGE
|
||||
CFLAGS="-fPIC -frtti -DROCKSDB_USE_RTTI" run make -j4 $LINKAGE
|
||||
run cd $USERDIR # Return to user's original directory
|
||||
|
|
Loading…
Reference in a new issue