未验证 提交 49daee2e 编写于 作者: X xige-16 提交者: GitHub

Fix lost disk index data (#19636)

Signed-off-by: Nxige-16 <xi.ge@zilliz.com>
Signed-off-by: Nxige-16 <xi.ge@zilliz.com>
上级 f98dbcf5
......@@ -52,7 +52,8 @@ VectorDiskAnnIndex<T>::Load(const BinarySet& binary_set /* not used */, const Co
auto index_files = GetValueFromConfig<std::vector<std::string>>(config, "index_files");
AssertInfo(index_files.has_value(), "index file paths is empty when load disk ann index data");
file_manager_->CacheIndexToDisk(index_files.value());
index_->Prepare(cfg);
auto ok = index_->Prepare(cfg);
AssertInfo(ok, "load disk index failed");
SetDim(index_->Dim());
}
......
......@@ -93,7 +93,7 @@ DiskFileManagerImpl::AddFile(const std::string& file) noexcept {
// Split local data to multi part with specified size
int slice_num = 0;
auto remotePrefix = GetRemoteIndexObjectPrefix();
for (int offset = 0; offset < fileSize; slice_num++) {
for (int64_t offset = 0; offset < fileSize; slice_num++) {
auto batch_size = std::min(milvus::config::KnowhereGetIndexSliceSize() << 20, int64_t(fileSize) - offset);
auto fieldData = std::make_shared<FieldData>(buf.get() + offset, batch_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册