Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
  • Loading branch information
sticnarf committed Aug 27, 2019
1 parent a6505e5 commit 1eadf1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/transaction/mod.rs
Expand Up @@ -28,6 +28,11 @@ mod transaction;
const PHYSICAL_SHIFT_BITS: i64 = 18;
const LOGICAL_MASK: i64 = (1 << PHYSICAL_SHIFT_BITS) - 1;

/// A timestamp returned from the timestamp oracle.
///
/// The version used in transactions can be converted from a timestamp.
/// The lower 18 (PHYSICAL_SHIFT_BITS) bits are the logical part of the timestamp.
/// The higher bits of the version are the physical part of the timestamp.
#[derive(Eq, PartialEq, Debug, Clone, Copy)]
pub struct Timestamp {
pub physical: i64,
Expand Down
5 changes: 1 addition & 4 deletions src/transaction/requests.rs
Expand Up @@ -243,10 +243,7 @@ impl KvRequest for kvrpcpb::ResolveLockRequest {
fn reduce(
results: BoxStream<'static, Result<Self::Result>>,
) -> BoxFuture<'static, Result<Self::Result>> {
results
.into_future()
.map(|(f, _)| f.expect("no results should be impossible"))
.boxed()
results.try_collect().boxed()
}
}

Expand Down

0 comments on commit 1eadf1d

Please sign in to comment.