@@ -237,7 +237,7 @@ class BTreeNode : public BTreeNodeHeader {
237237 }
238238
239239 Swip* ChildSwip (uint16_t slot_id) {
240- LS_DCHECK (slot_id < num_slots_);
240+ LEAN_DCHECK (slot_id < num_slots_);
241241 return reinterpret_cast <Swip*>(ValData (slot_id));
242242 }
243243
@@ -247,28 +247,28 @@ class BTreeNode : public BTreeNodeHeader {
247247
248248 // Attention: the caller has to hold a copy of the existing payload
249249 void ShortenPayload (uint16_t slot_id, uint16_t target_size) {
250- LS_DCHECK (target_size <= slot_[slot_id].val_size_ );
250+ LEAN_DCHECK (target_size <= slot_[slot_id].val_size_ );
251251 const uint16_t free_space = slot_[slot_id].val_size_ - target_size;
252252 space_used_ -= free_space;
253253 slot_[slot_id].val_size_ = target_size;
254254 }
255255
256256 bool CanExtendPayload (uint16_t slot_id, uint16_t target_size) {
257- LS_DCHECK (target_size > ValSize (slot_id),
258- " Target size must be larger than current size, "
259- " targetSize={}, currentSize={}" ,
260- target_size, ValSize (slot_id));
257+ LEAN_DCHECK (target_size > ValSize (slot_id),
258+ " Target size must be larger than current size, "
259+ " targetSize={}, currentSize={}" ,
260+ target_size, ValSize (slot_id));
261261
262262 const uint16_t extra_space_needed = target_size - ValSize (slot_id);
263263 return FreeSpaceAfterCompaction () >= extra_space_needed;
264264 }
265265
266266 // / Move key-value pair to a new location
267267 void ExtendPayload (uint16_t slot_id, uint16_t target_size) {
268- LS_DCHECK (CanExtendPayload (slot_id, target_size),
269- " ExtendPayload failed, not enough space in the current node, "
270- " slotId={}, targetSize={}, FreeSpace={}, currentSize={}" ,
271- slot_id, target_size, FreeSpaceAfterCompaction (), ValSize (slot_id));
268+ LEAN_DCHECK (CanExtendPayload (slot_id, target_size),
269+ " ExtendPayload failed, not enough space in the current node, "
270+ " slotId={}, targetSize={}, FreeSpace={}, currentSize={}" ,
271+ slot_id, target_size, FreeSpaceAfterCompaction (), ValSize (slot_id));
272272 auto key_size_without_prefix = KeySizeWithoutPrefix (slot_id);
273273 const uint16_t old_total_size = key_size_without_prefix + ValSize (slot_id);
274274 const uint16_t new_total_size = key_size_without_prefix + target_size;
@@ -285,7 +285,7 @@ class BTreeNode : public BTreeNodeHeader {
285285 if (FreeSpace () < new_total_size) {
286286 Compactify ();
287287 }
288- LS_DCHECK (FreeSpace () >= new_total_size);
288+ LEAN_DCHECK (FreeSpace () >= new_total_size);
289289 advance_data_offset (new_total_size);
290290 slot_[slot_id].offset_ = data_offset_;
291291 slot_[slot_id].key_size_without_prefix_ = key_size_without_prefix;
@@ -498,7 +498,7 @@ inline int16_t BTreeNode::LinearSearchWithBias(Slice key, uint16_t start_pos, bo
498498 return -1 ;
499499 }
500500
501- LS_DCHECK (key.size () >= prefix_size_ && bcmp (key.data (), LowerFenceAddr (), prefix_size_) == 0 );
501+ LEAN_DCHECK (key.size () >= prefix_size_ && bcmp (key.data (), LowerFenceAddr (), prefix_size_) == 0 );
502502
503503 // the compared key has the same prefix
504504 key.remove_prefix (prefix_size_);
@@ -575,8 +575,8 @@ inline int16_t BTreeNode::LowerBound(Slice key, bool* is_equal) {
575575inline void BTreeNode::set_fences (Slice lower_key, Slice upper_key) {
576576 InsertFence (lower_fence_, lower_key);
577577 InsertFence (upper_fence_, upper_key);
578- LS_DCHECK (LowerFenceAddr () == nullptr || UpperFenceAddr () == nullptr ||
579- *LowerFenceAddr () <= *UpperFenceAddr ());
578+ LEAN_DCHECK (LowerFenceAddr () == nullptr || UpperFenceAddr () == nullptr ||
579+ *LowerFenceAddr () <= *UpperFenceAddr ());
580580
581581 // prefix compression
582582 for (prefix_size_ = 0 ; (prefix_size_ < std::min (lower_key.size (), upper_key.size ())) &&
0 commit comments