code: func (w *bulkWorker) commitRequired() bool {
  	if w.bulkActions >= 0 && w.service.NumberOfActions() >= w.bulkActions {
  		return true
  	}
  	if w.bulkSize >= 0 && w.service.EstimatedSizeInBytes() >= int64(w.bulkSize) {
  		return true
  	}
  	return false
  }
docs: // commitRequired returns true if the service has to commit its
  // bulk requests. This can be either because the number of actions
  // or the estimated size in bytes is larger than specified in the
  // BulkProcessorService.