Struct tikv::storage::mvcc::reader::point_getter::PointGetter [−][src]
This struct can be used to get the value of user keys. Internally, rollbacks are ignored and smaller version will be tried. If the isolation level is Si, locks will be checked first.
Use PointGetterBuilder
to build PointGetter
.
Fields
snapshot: S
multi: bool
omit_value: bool
isolation_level: IsolationLevel
ts: TimeStamp
bypass_locks: TsSet
met_newer_ts_data: NewerTsCheckState
statistics: Statistics
write_cursor: Cursor<S::Iter>
drained: bool
Indicating whether or not this structure can serve more requests. It is meaningful only
when multi == false
, to protect from producing undefined values when trying to get
multiple values under multi == false
.
Implementations
impl<S: Snapshot> PointGetter<S>
[src]
pub fn take_statistics(&mut self) -> Statistics
[src]
Take out and reset the statistics collected so far.
pub fn met_newer_ts_data(&self) -> NewerTsCheckState
[src]
Whether we met newer ts data.
The result is always Unknown
if check_has_newer_ts_data
is not set.
pub fn get(&mut self, user_key: &Key) -> Result<Option<Value>>
[src]
Get the value of a user key.
If multi == false
, this function must be called only once. Future calls return nothing.
fn load_and_check_lock(&mut self, user_key: &Key) -> Result<()>
[src]
Get a lock of a user key in the lock CF. If lock exists, it will be checked to
see whether it conflicts with the given ts
.
In common cases we expect to get nothing in lock cf. Using a get_cf
instead of seek
is fast in such cases due to no need for RocksDB to continue move and skip deleted entries
until find a user key.
fn load_data(&mut self, user_key: &Key) -> Result<Option<Value>>
[src]
Load the value.
First, a correct version info in the Write CF will be sought. Then, value will be loaded from Default CF if necessary.
fn load_data_from_default_cf(
&mut self,
write_start_ts: TimeStamp,
user_key: &Key
) -> Result<Value>
[src]
&mut self,
write_start_ts: TimeStamp,
user_key: &Key
) -> Result<Value>
Load the value from default CF.
We assume that mostly the keys given to batch get keys are not very close to each other.
near_seek
will likely fall back to seek
in such scenario, which takes 2x time
compared to get_cf
. Thus we use get_cf
directly here.
Auto Trait Implementations
impl<S> !RefUnwindSafe for PointGetter<S>
impl<S> Send for PointGetter<S>
impl<S> !Sync for PointGetter<S>
impl<S> Unpin for PointGetter<S> where
S: Unpin,
<S as Snapshot>::Iter: Unpin,
S: Unpin,
<S as Snapshot>::Iter: Unpin,
impl<S> UnwindSafe for PointGetter<S> where
S: UnwindSafe,
<S as Snapshot>::Iter: UnwindSafe,
S: UnwindSafe,
<S as Snapshot>::Iter: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,