File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/crimson/os/seastore/btree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,9 @@ class FixedKVBtree {
101101 op_context_t c,
102102 mapped_space_visitor_t *visitor=nullptr ) const
103103 {
104+ #ifndef NDEBUG
104105 assert_valid ();
106+ #endif
105107 assert (!is_end ());
106108
107109 auto ret = *this ;
@@ -126,7 +128,9 @@ class FixedKVBtree {
126128
127129 iterator_fut prev (op_context_t c) const
128130 {
131+ #ifndef NDEBUG
129132 assert_valid ();
133+ #endif
130134 assert (!is_begin ());
131135
132136 auto ret = *this ;
@@ -167,6 +171,7 @@ class FixedKVBtree {
167171 });
168172 }
169173
174+ #ifndef NDEBUG
170175 void assert_valid () const {
171176 assert (leaf.node );
172177 assert (leaf.pos <= leaf.node ->get_size ());
@@ -183,6 +188,7 @@ class FixedKVBtree {
183188 }
184189 }
185190 }
191+ #endif
186192
187193 depth_t get_depth () const {
188194 return internal.size () + 1 ;
@@ -555,9 +561,11 @@ class FixedKVBtree {
555561 " ret.leaf.pos {}" ,
556562 c.trans ,
557563 ret.leaf .pos );
564+ #ifndef NDEBUG
558565 if (min_depth == 1 ) {
559566 ret.assert_valid ();
560567 }
568+ #endif
561569 return std::move (ret);
562570 });
563571 }
You can’t perform that action at this time.
0 commit comments