code: func (mvcc *MVCCLevelDB) ScanLock(startKey, endKey []byte, maxTS uint64) ([]*kvrpcpb.LockInfo, error) {
  	mvcc.mu.RLock()
  	defer mvcc.mu.RUnlock()
  
  	iter, currKey, err := newScanIterator(mvcc.db, startKey, endKey)
  	defer iter.Release()
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  
  	var locks []*kvrpcpb.LockInfo
  	for iter.Valid() {
  		dec := lockDecoder{expectKey: currKey}
  		ok, err := dec.Decode(iter)
  		if err != nil {
  			return nil, errors.Trace(err)
  		}
  		if ok && dec.lock.startTS <= maxTS {
  			locks = append(locks, &kvrpcpb.LockInfo{
  				PrimaryLock: dec.lock.primary,
  				LockVersion: dec.lock.startTS,
  				Key:         currKey,
  			})
  		}
  
  		skip := skipDecoder{currKey: currKey}
  		_, err = skip.Decode(iter)
  		if err != nil {
  			return nil, errors.Trace(err)
  		}
  		currKey = skip.currKey
  	}
  	return locks, nil
  }
docs: // ScanLock implements the MVCCStore interface.