mirror of https://github.com/tikv/client-rust.git
parent
da7d0d9d1f
commit
319ec52545
|
@ -103,7 +103,7 @@ impl Client {
|
||||||
/// Create a new 'batch get' request.
|
/// Create a new 'batch get' request.
|
||||||
///
|
///
|
||||||
/// Once resolved this request will result in the fetching of the values associated with the
|
/// Once resolved this request will result in the fetching of the values associated with the
|
||||||
/// given keys, skipping non-existent entris.
|
/// given keys, skipping non-existent entries.
|
||||||
///
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// # use tikv_client::{KvPair, Config, RawClient};
|
/// # use tikv_client::{KvPair, Config, RawClient};
|
||||||
|
|
|
@ -63,10 +63,7 @@ impl Buffer {
|
||||||
|
|
||||||
let cached_results = cached_results
|
let cached_results = cached_results
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|(k, v)| match v.unwrap() {
|
.filter_map(|(k, v)| v.unwrap().map(|v| KvPair(k, v)));
|
||||||
Some(v) => Some(KvPair(k, v)),
|
|
||||||
None => None,
|
|
||||||
});
|
|
||||||
|
|
||||||
let undetermined_keys = undetermined_keys.into_iter().map(|(k, _)| k).collect();
|
let undetermined_keys = undetermined_keys.into_iter().map(|(k, _)| k).collect();
|
||||||
(cached_results, undetermined_keys)
|
(cached_results, undetermined_keys)
|
||||||
|
|
|
@ -75,7 +75,7 @@ impl Transaction {
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the values associated with the given keys, skipping non-existent entris.
|
/// Gets the values associated with the given keys, skipping non-existent entries.
|
||||||
///
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
/// # use tikv_client::{Key, Value, Config, transaction::Client};
|
/// # use tikv_client::{Key, Value, Config, transaction::Client};
|
||||||
|
|
|
@ -18,7 +18,7 @@ const SCAN_BATCH_SIZE: u32 = 1000;
|
||||||
const NUM_PEOPLE: u32 = 100;
|
const NUM_PEOPLE: u32 = 100;
|
||||||
const NUM_TRNASFER: u32 = 100;
|
const NUM_TRNASFER: u32 = 100;
|
||||||
|
|
||||||
/// Delete all entris in TiKV to leave a clean space for following tests.
|
/// Delete all entries in TiKV to leave a clean space for following tests.
|
||||||
/// TiKV does not provide an elegant way to do this, so it is done by scanning and deletions.
|
/// TiKV does not provide an elegant way to do this, so it is done by scanning and deletions.
|
||||||
async fn clear_tikv() -> Fallible<()> {
|
async fn clear_tikv() -> Fallible<()> {
|
||||||
delete_all_raw().await?;
|
delete_all_raw().await?;
|
||||||
|
|
Loading…
Reference in New Issue