Skip to content

Commit c1be6a3

Browse files
committed
vector聚合访问,中间某轮返回空,不提前终止后续轮次的访问
1 parent a6f67d8 commit c1be6a3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

protocol/src/vector/attachment.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ impl RetrieveAttach {
368368
self.body.push(body_data);
369369
self.body_token_count += rows * columns;
370370
self.left_count = self.left_count.saturating_sub(rows);
371+
log::debug!("left_count: {}", self.left_count);
371372
}
372373

373374
#[inline]
@@ -413,6 +414,7 @@ impl RetrieveAttach {
413414
}
414415
}
415416
}
417+
log::debug!("si len: {},content: {:?}", self.si.len(), self.si);
416418
self.si.len() > 0
417419
}
418420
#[inline]

protocol/src/vector/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,18 @@ impl Protocol for Vector {
199199

200200
match vec_attach.attch_type() {
201201
AttachType::Retrieve => {
202-
// 如果header为none,说明查询结果为空,直接返回false
202+
let attach = vec_attach.retrieve_attach_mut();
203+
// 如果header为none,说明当前查询结果为空
204+
// 如果有si,则看是否还有后续请求
205+
// 如果没有si,直接返回false
203206
if response.header.is_none() {
207+
if attach.has_si() {
208+
return attach.left_count != 0;
209+
}
204210
return false;
205211
}
206212

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

0 commit comments

Comments
 (0)