Skip to content

Commit

Permalink
fix: [Cherry-pick] throw exception when upload file failed for DiskIn…
Browse files Browse the repository at this point in the history
…dex (#29628)

Cherry pick from master
pr: #29627 
related to: #29417

Signed-off-by: xianliang <xianliang.li@zilliz.com>
  • Loading branch information
foxspy authored Jan 3, 2024
1 parent 7578346 commit 66c8465
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/core/src/index/VectorDiskIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ template <typename T>
BinarySet
VectorDiskAnnIndex<T>::Upload(const Config& config) {
BinarySet ret;
index_.Serialize(ret);
auto stat = index_.Serialize(ret);
if (stat != knowhere::Status::success) {
PanicInfo(ErrorCode::UnexpectedError,
"failed to serialize index, " + KnowhereStatusString(stat));
}
auto remote_paths_to_size = file_manager_->GetRemotePathsToFileSize();
for (auto& file : remote_paths_to_size) {
ret.Append(file.first, nullptr, file.second);
Expand Down

0 comments on commit 66c8465

Please sign in to comment.