In ScyllaDb, we are currently doing the multi-key reading with a join_all which is suboptimal.
Proposal
The following was done:
The run_reads was updated by adding the reading of keys. Curiously the read_value_byteswas not tested before.
Premature terminations if the set of keys is empty have been added. Several levels are needed since the LruCaching means that the final query could be empty while the initial one was not.
The scenario code has been changed to get a larger variety of examples.
The entry k IN (?,?,?,?) construction is used and this returns the values in disorder.
Therefore a HashMap<Vec<u8>,Vec<usize>>Rust cannot deduce the types) is needed to determine if a key is missing and the query of k,v allows to match the result with the queries.
The Box::pin is needed for a large stack identified by clippy. Maybe we could do that to other functions.
Test Plan
The CI was slightly updated. Note that during the development process, the Lrucache had to be disabled as it led to code passing the tests while a bug was known to be present.
Motivation
In ScyllaDb, we are currently doing the multi-key reading with a
join_all
which is suboptimal.Proposal
The following was done:
run_reads
was updated by adding the reading of keys. Curiously theread_value_bytes
was not tested before.k IN (?,?,?,?)
construction is used and this returns the values in disorder.HashMap<Vec<u8>,Vec<usize>>
Rust cannot deduce the types) is needed to determine if a key is missing and the query ofk,v
allows to match the result with the queries.The
Box::pin
is needed for a large stack identified by clippy. Maybe we could do that to other functions.Test Plan
The CI was slightly updated. Note that during the development process, the Lrucache had to be disabled as it led to code passing the tests while a bug was known to be present.
Release Plan
Not relevant.
Links