diff --git a/configure.ac b/configure.ac index a9c4577e0..eb97a37a6 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/deps/rocksdb b/deps/rocksdb index 7f5f0e0c0..896944564 160000 --- a/deps/rocksdb +++ b/deps/rocksdb @@ -1 +1 @@ -Subproject commit 7f5f0e0c03d20f84653a991de324810d16a33822 +Subproject commit 8969445642039566214d650cc6614849e7dd5e17 diff --git a/include/ircd/db/database/database.h b/include/ircd/db/database/database.h index 5cc2b6233..36b0e00f2 100644 --- a/include/ircd/db/database/database.h +++ b/include/ircd/db/database/database.h @@ -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; + using prop_map = std::map; template R property(const database &, const string_view &name); template<> prop_int property(const database &, const string_view &name); diff --git a/include/ircd/db/database/env/env.h b/include/ircd/db/database/env/env.h index 256a28c24..385d3199f 100644 --- a/include/ircd/db/database/env/env.h +++ b/include/ircd/db/database/env/env.h @@ -84,6 +84,7 @@ struct ircd::db::database::env final Status GetThreadList(std::vector* 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; diff --git a/ircd/Makefile.am b/ircd/Makefile.am index dfb5a5603..e3a2c4f90 100644 --- a/ircd/Makefile.am +++ b/ircd/Makefile.am @@ -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 diff --git a/ircd/db.cc b/ircd/db.cc index eb20e3fbc..25c6e889b 100644 --- a/ircd/db.cc +++ b/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 ret; + std::map ret; database::column &c(const_cast(column)); database &d(const_cast(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; diff --git a/tools/buildrocks.sh b/tools/buildrocks.sh index a7d03fa46..2bdefa062 100755 --- a/tools/buildrocks.sh +++ b/tools/buildrocks.sh @@ -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