Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions protocol/src/vector/attachment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ impl RetrieveAttach {
self.body.push(body_data);
self.body_token_count += rows * columns;
self.left_count = self.left_count.saturating_sub(rows);
log::debug!("left_count: {}", self.left_count);
}

#[inline]
Expand Down Expand Up @@ -413,6 +414,7 @@ impl RetrieveAttach {
}
}
}
log::debug!("si len: {},content: {:?}", self.si.len(), self.si);
self.si.len() > 0
}
#[inline]
Expand Down
9 changes: 7 additions & 2 deletions protocol/src/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,18 @@ impl Protocol for Vector {

match vec_attach.attch_type() {
AttachType::Retrieve => {
// 如果header为none,说明查询结果为空,直接返回false
let attach = vec_attach.retrieve_attach_mut();
// 如果header为none,说明当前查询结果为空
// 如果有si,则看是否还有后续请求
// 如果没有si,直接返回false
if response.header.is_none() {
if attach.has_si() {
return attach.left_count != 0;
}
return false;
}

assert!(response.header.is_some(), "rsp:{}", response);
let attach = vec_attach.retrieve_attach_mut();
let body_data = response.data().0.to_vec();
let header = response.header.as_mut().expect("rsp header");

Expand Down