mirror of https://github.com/tikv/client-rust.git
Merge branch 'master' into fix-integration-test
This commit is contained in:
commit
a1d80250e9
|
@ -10,11 +10,10 @@ use crate::{
|
||||||
transaction::HasLocks,
|
transaction::HasLocks,
|
||||||
BoundRange, ColumnFamily, Key, KvPair, Result, Value,
|
BoundRange, ColumnFamily, Key, KvPair, Result, Value,
|
||||||
};
|
};
|
||||||
use tikv_client_store::{KvClient, RpcFnType, Store};
|
|
||||||
|
|
||||||
use futures::{future::BoxFuture, prelude::*, stream::BoxStream};
|
use futures::{future::BoxFuture, prelude::*, stream::BoxStream};
|
||||||
use kvproto::{kvrpcpb, tikvpb::TikvClient};
|
use kvproto::{kvrpcpb, tikvpb::TikvClient};
|
||||||
use std::{mem, sync::Arc};
|
use std::{mem, sync::Arc};
|
||||||
|
use tikv_client_store::{KvClient, RpcFnType, Store};
|
||||||
|
|
||||||
impl KvRequest for kvrpcpb::RawGetRequest {
|
impl KvRequest for kvrpcpb::RawGetRequest {
|
||||||
type Result = Option<Value>;
|
type Result = Option<Value>;
|
||||||
|
@ -331,10 +330,7 @@ impl KvRequest for kvrpcpb::RawDeleteRangeRequest {
|
||||||
fn reduce(
|
fn reduce(
|
||||||
results: BoxStream<'static, Result<Self::Result>>,
|
results: BoxStream<'static, Result<Self::Result>>,
|
||||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||||
results
|
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||||
.into_future()
|
|
||||||
.map(|(f, _)| f.expect("no results should be impossible"))
|
|
||||||
.boxed()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -346,10 +346,7 @@ impl KvRequest for kvrpcpb::PrewriteRequest {
|
||||||
fn reduce(
|
fn reduce(
|
||||||
results: BoxStream<'static, Result<Self::Result>>,
|
results: BoxStream<'static, Result<Self::Result>>,
|
||||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||||
results
|
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||||
.into_future()
|
|
||||||
.map(|(f, _)| f.expect("no results should be impossible"))
|
|
||||||
.boxed()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,10 +405,7 @@ impl KvRequest for kvrpcpb::CommitRequest {
|
||||||
fn reduce(
|
fn reduce(
|
||||||
results: BoxStream<'static, Result<Self::Result>>,
|
results: BoxStream<'static, Result<Self::Result>>,
|
||||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||||
results
|
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||||
.into_future()
|
|
||||||
.map(|(f, _)| f.expect("no results should be impossible"))
|
|
||||||
.boxed()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,10 +450,7 @@ impl KvRequest for kvrpcpb::BatchRollbackRequest {
|
||||||
fn reduce(
|
fn reduce(
|
||||||
results: BoxStream<'static, Result<Self::Result>>,
|
results: BoxStream<'static, Result<Self::Result>>,
|
||||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||||
results
|
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||||
.into_future()
|
|
||||||
.map(|(f, _)| f.expect("no results should be impossible"))
|
|
||||||
.boxed()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue