Skip to content

Commit

Permalink
Merge pull request #275 from turbofish-org/client-next-tempfix
Browse files Browse the repository at this point in the history
Temporary fix for client tracing for iterators
  • Loading branch information
keppel authored Nov 15, 2024
2 parents 89e919b + 389d529 commit 60ea7ca
Showing 1 changed file with 7 additions and 2 deletions.
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

0 comments on commit 60ea7ca

Please sign in to comment.