From ea254a0a154f1f08460c6e2c52cfb158178bb7c1 Mon Sep 17 00:00:00 2001 From: sunby Date: Mon, 23 Dec 2024 14:59:15 +0800 Subject: [PATCH] add debug info Signed-off-by: sunby --- internal/core/src/index/InvertedIndexTantivy.cpp | 4 ++++ internal/core/src/storage/DiskFileManagerImpl.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/core/src/index/InvertedIndexTantivy.cpp b/internal/core/src/index/InvertedIndexTantivy.cpp index 0449960791c73..106d0121d1303 100644 --- a/internal/core/src/index/InvertedIndexTantivy.cpp +++ b/internal/core/src/index/InvertedIndexTantivy.cpp @@ -9,6 +9,7 @@ // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License +#include "common/EasyAssert.h" #include "tantivy-binding.h" #include "common/Slice.h" #include "common/RegexQuery.h" @@ -85,6 +86,8 @@ InvertedIndexTantivy::InitForBuildIndex() { } wrapper_ = std::make_shared( field.c_str(), d_type_, path_.c_str()); + std::cout << fmt::format("init for build index path {}", path_) + << std::endl; } template @@ -96,6 +99,7 @@ InvertedIndexTantivy::InvertedIndexTantivy( disk_file_manager_ = std::make_shared(ctx); // push init wrapper to load process if (ctx.for_loading_index) { + std::cout << "init for load index" << std::endl; return; } InitForBuildIndex(); diff --git a/internal/core/src/storage/DiskFileManagerImpl.cpp b/internal/core/src/storage/DiskFileManagerImpl.cpp index e54fa6d748825..2a5df52cc8c11 100644 --- a/internal/core/src/storage/DiskFileManagerImpl.cpp +++ b/internal/core/src/storage/DiskFileManagerImpl.cpp @@ -55,8 +55,10 @@ DiskFileManagerImpl::DiskFileManagerImpl( DiskFileManagerImpl::~DiskFileManagerImpl() { auto local_chunk_manager = LocalChunkManagerSingleton::GetInstance().GetChunkManager(); - local_chunk_manager->RemoveDir(GetIndexPathPrefixWithBuildID( - local_chunk_manager, index_meta_.build_id)); + auto p = GetIndexPathPrefixWithBuildID(local_chunk_manager, + index_meta_.build_id); + std::cout << fmt::format("disk fm remove index path:{}", p) << std::endl; + local_chunk_manager->RemoveDir(p); } bool