Function tikv::storage::txn::actions::check_data_constraint::check_data_constraint[][src]

pub(crate) fn check_data_constraint<S: Snapshot>(
    reader: &mut SnapshotReader<S>,
    should_not_exist: bool,
    write: &Write,
    write_commit_ts: TimeStamp,
    key: &Key
) -> MvccResult<()>

Checks the existence of the key according to should_not_exist. If not, returns an AlreadyExist error. The caller must guarantee that the given write is the latest version of the key.