Skip to content

Commit

Permalink
add debug info
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <[email protected]>
  • Loading branch information
sunby committed Dec 23, 2024
1 parent 6a63aa3 commit ea254a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions internal/core/src/index/InvertedIndexTantivy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -85,6 +86,8 @@ InvertedIndexTantivy<T>::InitForBuildIndex() {
}
wrapper_ = std::make_shared<TantivyIndexWrapper>(
field.c_str(), d_type_, path_.c_str());
std::cout << fmt::format("init for build index path {}", path_)
<< std::endl;
}

template <typename T>
Expand All @@ -96,6 +99,7 @@ InvertedIndexTantivy<T>::InvertedIndexTantivy(
disk_file_manager_ = std::make_shared<DiskFileManager>(ctx);
// push init wrapper to load process
if (ctx.for_loading_index) {
std::cout << "init for load index" << std::endl;
return;
}
InitForBuildIndex();
Expand Down
6 changes: 4 additions & 2 deletions internal/core/src/storage/DiskFileManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea254a0

Please sign in to comment.