From 6806e5a9e0b82d9f0c5c26ae13440fc0df8ab92c Mon Sep 17 00:00:00 2001 From: Mehdi Hosseini <116847813+shosseinimotlagh@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:18:12 -0700 Subject: [PATCH] Fix to_dot_keys issues for homeobject (#482) --- .DS_Store | Bin 8196 -> 0 bytes conanfile.py | 2 +- .../homestore/btree/detail/btree_mutate_impl.ipp | 14 -------------- .../homestore/btree/detail/simple_node.hpp | 11 ++++++++--- 4 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 04e3372dddc6554a4509762009625dc91bada321..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM-D(p-6h4z|nhmW|rGxdQVO}( zx9|Z(yz)WRXAv*-o1d2KG{p-+3eJ?7Gdpv>vuD2f*_$_f@YgEd!Q; z|B?Z5K6uDNRYj^;KUT1n0_6c8X5f#X%0R^zsHZ(t;ujvnyzP9E-!y$xx7=D zD!N5?+I>~u{EH8TZR@aUfy`!}<>UZy~9v_$7`J1=z?=<$qUc}$Y z;StlP4_#8vr{#Op#s+^-kE4)BU9<|s3~kUukoA}zP>r_f3FH!JHArIDp_`?%CCT5X zPL@t4{2AB0f@>EsP0+-&olXMkZM2Bzu3_PaVPWCV7GN!gwH_8lYI>9tV;%SCGRFK! zd$f%ukpPom)G58CH0w+5tAU+?FC14$;u>jJE~gHVeLBqI@*4)u!Dux9i%ykX$xfD`l8p$0I!(n^eaOWMF@hLtz4Wvq<+C&P|I2e1**LDo;X z`9F+pe!%2%x8Hxsge@!s7n^~+a&JMz|2Ue?yZ^t~gRtIN1}p=A#Q<|Q>zh@WIQeyJ zS`)Fhhx{5@B%wD_QbJJ3a2!&G ANB{r; diff --git a/conanfile.py b/conanfile.py index e9f91d434..b10e4f860 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.4.35" + version = "6.4.36" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" diff --git a/src/include/homestore/btree/detail/btree_mutate_impl.ipp b/src/include/homestore/btree/detail/btree_mutate_impl.ipp index 0c5313eb2..209b35558 100644 --- a/src/include/homestore/btree/detail/btree_mutate_impl.ipp +++ b/src/include/homestore/btree/detail/btree_mutate_impl.ipp @@ -299,20 +299,6 @@ btree_status_t Btree< K, V >::split_node(const BtreeNodePtr& parent_node, const return ret; } -// template < typename K, typename V > -// template < typename ReqT > -// bool Btree< K, V >::is_split_needed(const BtreeNodePtr& node, ReqT& req) const { -// if (!node->is_leaf()) { // if internal node, size is atmost one additional entry, size of K/V -// return node->total_entries() >= 3; -// } else if constexpr (std::is_same_v< ReqT, BtreeRangePutRequest< K > >) { -// return node->total_entries() >= 3; -// } else if constexpr (std::is_same_v< ReqT, BtreeSinglePutRequest >) { -// return node->total_entries() >= 3;; -// } else { -// return false; -// } -// } - template < typename K, typename V > template < typename ReqT > bool Btree< K, V >::is_split_needed(const BtreeNodePtr& node, ReqT& req) const { diff --git a/src/include/homestore/btree/detail/simple_node.hpp b/src/include/homestore/btree/detail/simple_node.hpp index 6c038df7f..20f8b264d 100644 --- a/src/include/homestore/btree/detail/simple_node.hpp +++ b/src/include/homestore/btree/detail/simple_node.hpp @@ -227,10 +227,16 @@ class SimpleNode : public VariantNode< K, V > { } return str; } - std::string to_dot_keys() const override { + return to_dot_keys_impl(std::is_same{}); + } + + std::string to_dot_keys_impl(std::false_type) const { + return ""; + } + + std::string to_dot_keys_impl(std::true_type) const { std::string str; -#if 0 std::string snext = this->next_bnode() == empty_bnodeid ? "" : fmt::format("next_node={}", this->next_bnode()); str += fmt::format(R"("{}" [ shape = none, @@ -315,7 +321,6 @@ class SimpleNode : public VariantNode< K, V > { 1, this->node_id(), this->link_version(), this->node_gen(), snext); return str + keys_buf; } -#endif return str; }