8000 bugfix: If it fails or not found in search, do not return directly and process the next pk. by zhaozhengcoder · Pull Request #296 · alibaba/havenask · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bugfix: If it fails or not found in search, do not return directly and process the next pk. #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions aios/storage/indexlib/table/kv_table/KVTabletReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,21 @@ KVTabletReader::FillRows(const std::shared_ptr<index::KVIndexReader>& kvReader,
base::PartitionResponse& partitionResponse)
{
for (int i = 0; i < pkList.size(); ++i) {
auto row = partitionResponse.add_rows();
base::Row row;
if constexpr (std::is_integral<T>::value) {
RETURN_STATUS_DIRECTLY_IF_ERROR(QueryAttrWithPk(kvReader, pkList[i], attrs, packAttributeFormatter, *row));
// Note: If it fails or not found, do not return directly, need process the next pk.
auto st = QueryAttrWithPk(kvReader, pkList[i], attrs, packAttributeFormatter, row);
if (!st.is_ok()) {
continue;
}
partitionResponse.add_rows()->Swap(&row);
} else {
autil::StringView constStr(pkList[i].data(), pkList[i].size());
RETURN_STATUS_DIRECTLY_IF_ERROR(QueryAttrWithPk(kvReader, constStr, attrs, packAttributeFormatter, *row));
auto st = QueryAttrWithPk(kvReader, constStr, attrs, packAttributeFormatter, row);
if (!st.is_ok()) {
continue;
}
partitionResponse.add_rows()->Swap(&row);
}
}
indexlib::index::AttrHelper::FillAttrInfo(attrs, partitionResponse);
Expand Down
0