Function tikv::storage::mvcc::seek_for_valid_write[][src]

pub fn seek_for_valid_write<I>(
    write_cursor: &mut Cursor<I>,
    user_key: &Key,
    after_ts: TimeStamp,
    gc_fence_limit: TimeStamp,
    statistics: &mut Statistics
) -> Result<Option<Write>> where
    I: Iterator

Seek for the next valid (write type == Put or Delete) write record. The write cursor must indicate a data key of the user key of which ts <= after_ts. Return None if cannot find any valid write record.

GC fence will be checked against the specified gc_fence_limit. If gc_fence_limit is greater than the commit_ts of the current write record pointed by the cursor, The caller must guarantee that there are no other versions in range (current_commit_ts, gc_fence_limit]. Note that if a record is determined as invalid by checking GC fence, the write_cursor’s position will be left remain on it.