// PessimisticRollback implements the MVCCStore interface.
PessimisticRollback implements the MVCCStore interface.
// PessimisticRollback implements the MVCCStore interface .
func (mvcc *MVCCRocksDB) PessimisticRollback(keys [][]byte, startTS, forUpdateTS uint64) []error {
	mvcc.mu.Lock()
	defer mvcc.mu.Unlock()
	anyError := false
	batch := gorocksdb.NewWriteBatch()
	errs := make([]error, 0, len(keys))
	for _, key := range keys {
		err := pessimisticRollbackKey(mvcc.db, batch, key, startTS, forUpdateTS)
		errs = append(errs, err)
		if err != nil {
			anyError = true
		}
	}
	if anyError {
		return errs
	}
	if err := mvcc.db.Write(gorocksdb.NewDefaultWriteOptions(), batch); err != nil {
		return []error{err}
	}
	return errs
}
func ( mvcc * MVCCRocksDB ) PessimisticRollback ( keys [ ] [ ] byte , startTS , forUpdateTS uint64 ) [ ] error { mvcc . mu . Lock ( ) defer mvcc . mu . Unlock ( ) anyError := false batch := gorocksdb . NewWriteBatch ( ) errs := make ( [ ] error , 0 , len ( keys ) ) for _ , key := range keys { err := pessimisticRollbackKey ( mvcc . db , batch , key , startTS , forUpdateTS ) errs = append ( errs , err ) if err != nil { anyError = true } } if anyError { return errs } if err := mvcc . db . Write ( gorocksdb . NewDefaultWriteOptions ( ) , batch ) ; err != nil { return [ ] error { err } } return errs }
PessimisticRollback implements the MVCCStore interface.
PessimisticRollback implements the MVCCStore interface .