// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
+#ifdef WITH_SEASTAR
+#include "crimson/os/alienstore/alien_store.h"
+#endif
+
#include "BlueRocksEnv.h"
#include "BlueFS.h"
#include "include/stringify.h"
*path = "temp_" + stringify(++foo);
return rocksdb::Status::OK();
}
+
+void BlueRocksEnv::StartThread(void(*function)(void* arg), void* arg)
+{
+#ifdef WITH_SEASTAR
+ crimson::os::AlienStore::configure_thread_memory();
+#endif
+ base_t::StartThread(function, arg);
+}
class BlueFS;
class BlueRocksEnv : public rocksdb::EnvWrapper {
+ using base_t = EnvWrapper;
+
void split(const std::string &fn, std::string *dir, std::string *file) {
size_t slash = fn.rfind('/');
*file = fn.substr(slash + 1);
rocksdb::Status GetAbsolutePath(const std::string& db_path,
std::string* output_path) override;
+ // Start new thread taking care about Seastar's allocator init.
+ void StartThread(void(*function)(void* arg), void* arg) override;
+
explicit BlueRocksEnv(BlueFS *f);
private:
BlueFS *fs;