From 21bdb5718fb4204d704c3f2f5ada2ff1de3bce2d Mon Sep 17 00:00:00 2001 From: Hui Xiao Date: Mon, 18 Nov 2024 15:00:56 -0800 Subject: [PATCH] Add dbg message --- db/db_impl/db_impl_debug.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/db/db_impl/db_impl_debug.cc b/db/db_impl/db_impl_debug.cc index 912f9103899..f8b2c6a757a 100644 --- a/db/db_impl/db_impl_debug.cc +++ b/db/db_impl/db_impl_debug.cc @@ -6,8 +6,8 @@ // Copyright (c) 2011 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. - #ifndef NDEBUG +#include #include "db/blob/blob_file_cache.h" #include "db/column_family.h" @@ -379,7 +379,11 @@ void DBImpl::TEST_VerifyNoObsoleteFilesCached( uint64_t file_number; GetUnaligned(reinterpret_cast(key.data()), &file_number); // Assert file is in live/quarantined set - assert(live_and_quar_files.find(file_number) != live_and_quar_files.end()); + if (live_and_quar_files.find(file_number) == live_and_quar_files.end()) { + std::cerr << "File " << file_number << " is not live nor quarantined" + << std::endl; + assert(false); + } }; table_cache_->ApplyToAllEntries(fn, {}); }