mirror of https://github.com/tikv/client-rust.git
use try_for_each_concurrent in reduce()
Signed-off-by: ekexium <ekexium@gmail.com>
This commit is contained in:
parent
6fca06a7cb
commit
344f7cce75
|
@ -330,7 +330,9 @@ impl KvRequest for kvrpcpb::RawDeleteRangeRequest {
|
|||
fn reduce(
|
||||
results: BoxStream<'static, Result<Self::Result>>,
|
||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||
results
|
||||
.try_for_each_concurrent(None, |_| future::ready(Ok(())))
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,9 @@ impl KvRequest for kvrpcpb::PrewriteRequest {
|
|||
fn reduce(
|
||||
results: BoxStream<'static, Result<Self::Result>>,
|
||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||
results
|
||||
.try_for_each_concurrent(None, |_| future::ready(Ok(())))
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -405,7 +407,9 @@ impl KvRequest for kvrpcpb::CommitRequest {
|
|||
fn reduce(
|
||||
results: BoxStream<'static, Result<Self::Result>>,
|
||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||
results
|
||||
.try_for_each_concurrent(None, |_| future::ready(Ok(())))
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -450,7 +454,9 @@ impl KvRequest for kvrpcpb::BatchRollbackRequest {
|
|||
fn reduce(
|
||||
results: BoxStream<'static, Result<Self::Result>>,
|
||||
) -> BoxFuture<'static, Result<Self::Result>> {
|
||||
results.try_for_each(|_| future::ready(Ok(()))).boxed()
|
||||
results
|
||||
.try_for_each_concurrent(None, |_| future::ready(Ok(())))
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue