Skip to content
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

Temporary fix for client tracing for iterators #275

Merged
merged 3 commits into from
Nov 15, 2024
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
9 changes: 7 additions & 2 deletions src/client/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ where
(key.clone(), StepResult::FetchKey(key))
}
Err(Error::StoreErr(store::Error::GetNextUnknown(key))) => {
(key.clone(), StepResult::FetchNext(key))
// (key.clone(), StepResult::FetchNext(key))
// TODO: optimistically attempt to trace and only use fetchnext as fallback. we
// only do this because unwrapping a collections::Map::Iter entry
// does not push a trace yet
return Ok(StepResult::FetchNext(key));
}
Err(Error::StoreErr(store::Error::GetPrevUnknown(maybe_key))) => {
if let Some(key) = maybe_key {
Expand Down Expand Up @@ -436,7 +440,8 @@ mod tests {
assert_eq!(res, 3);
assert_eq!(
client.queries.into_inner().unwrap(),
vec![vec![2], vec![0, 128]]
// TODO: 2nd query shouldn't be necessary
vec![vec![2], vec![3, 0, 1], vec![0, 128]]
);
}

Expand Down
Loading