code: func (iter *dbCacheIterator) skipPendingUpdates(forwards bool) {
  	for iter.dbIter.Valid() {
  		var skip bool
  		key := iter.dbIter.Key()
  		if iter.cacheSnapshot.pendingRemove.Has(key) {
  			skip = true
  		} else if iter.cacheSnapshot.pendingKeys.Has(key) {
  			skip = true
  		}
  		if !skip {
  			break
  		}
  
  		if forwards {
  			iter.dbIter.Next()
  		} else {
  			iter.dbIter.Prev()
  		}
  	}
  }
docs: // skipPendingUpdates skips any keys at the current database iterator position
  // that are being updated by the cache.  The forwards flag indicates the
  // direction the iterator is moving.