Skip to content

Commit

Permalink
Fix btree compilation issues. (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanebay authored Sep 26, 2023
1 parent 319a3d5 commit 1859c4c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/homestore/btree/btree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Btree {
// to overcome the gcc bug, pointer here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66944
static BtreeThreadVariables* bt_thread_vars() {
auto this_id(boost::this_fiber::get_id());
static thread_local std::map< fibers::fiber::id, std::unique_ptr< BtreeThreadVariables > > fiber_map;
static thread_local std::map< boost::fibers::fiber::id, std::unique_ptr< BtreeThreadVariables > > fiber_map;
if (fiber_map.count(this_id)) { return fiber_map[this_id].get(); }
fiber_map[this_id] = std::make_unique< BtreeThreadVariables >();
return fiber_map[this_id].get();
Expand Down
3 changes: 3 additions & 0 deletions src/include/homestore/btree/detail/simple_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ class SimpleNode : public BtreeNode {
}

std::string to_string_keys(bool print_friendly = false) const override {
#if 0
std::string delimiter = print_friendly ? "\n" : "\t";
auto str = fmt::format("{}{} nEntries={} {} ",
print_friendly ? "------------------------------------------------------------\n" : "",
Expand Down Expand Up @@ -314,6 +315,8 @@ class SimpleNode : public BtreeNode {
fmt::format_to(std::back_inserter(str), "-{}]", cur_key);
}
return str;
#endif
return {};
}

uint8_t* get_node_context() override { return uintptr_cast(this) + sizeof(SimpleNode< K, V >); }
Expand Down
3 changes: 3 additions & 0 deletions src/include/homestore/btree/detail/varlen_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ class VariableNode : public BtreeNode {
}

std::string to_string_keys(bool print_friendly = false) const override {
#if 0
std::string delimiter = print_friendly ? "\n" : "\t";
auto str = fmt::format("{}{} nEntries={} {} ",
print_friendly ? "------------------------------------------------------------\n" : "",
Expand Down Expand Up @@ -570,6 +571,8 @@ class VariableNode : public BtreeNode {
fmt::format_to(std::back_inserter(str), "-{}]", cur_key);
}
return str;
#endif
return {};
}

uint8_t* get_node_context() override { return uintptr_cast(this) + sizeof(VariableNode< K, V >); }
Expand Down

0 comments on commit 1859c4c

Please sign in to comment.