// markAsWillFail records the error and changes the state of the worker to reflect this
552959
func (sdw *SplitDiffWorker) markAsWillFail(er concurrency.ErrorRecorder, err error) {
	er.RecordError(err)
	sdw.SetState(WorkerStateDiffWillFail)
}
673230
func (v *ProcTableImpl) MarkFailed(pvName string) error {
	return v.markStatus(pvName, CSFailed)
}
326128
func (f *FakeProcTableImpl) MarkFailed(pvName string) error {
	f.MarkDoneCount++
	return f.realTable.MarkFailed(pvName)
}
27613
func (p *FlushByRamOrCountsPolicy) markLargestWriterPending(control *DocumentsWriterFlushControl,
	perThreadState *ThreadState, currentBytesPerThread int64) {
	control.setFlushPending(p.findLargestNonPendingWriter(control, perThreadState))
}
1371305
func (us *unionStore) markLazyConditionPair(k Key, v []byte, e error) {
	us.lazyConditionPairs[string(k)] = &conditionPair{
		key:   k.Clone(),
		value: v,
		err:   e,
	}
}
210559
func (c *Client) ErrorWithStackSkip(level string, err error, skip int) {
	c.ErrorWithStackSkipWithExtras(level, err, skip, noExtras)
}
976489
func (f *FakeProcTableImpl) MarkRunning(pvName string) error {
	f.MarkRunningCount++
	return f.realTable.MarkRunning(pvName)
}
213975
func (s *RefreshSchemasStatus) SetLastFailureMessage(v string) *RefreshSchemasStatus {
	s.LastFailureMessage = &v
	return s
}
1301164
func (v *ProcTableImpl) MarkRunning(pvName string) error {
	v.mutex.Lock()
	defer v.mutex.Unlock()
	_, ok := v.procTable[pvName]
	if ok {
		return fmt.Errorf("Failed to mark running of %q as it is already running, should never happen", pvName)
	}
	v.procTable[pvName] = ProcEntry{StartTime: time.Now(), Status: CSRunning}
	return nil
}
371494
func (a *AllocGarbageCollector) MarkForCollection(allocID string, ar AllocRunner) {
	if a.allocRunners.Push(allocID, ar) {
		a.logger.Info("marking allocation for GC", "alloc_id", allocID)
	}
}
1147040
func taskWillNeverRun(task *api.Task) bool {
	return task.Status.State < api.TaskStateAssigned && task.DesiredState > api.TaskStateRunning
}
523260
func (c *Conn) markForUse() {
	c.lastUsed = time.Now()
	atomic.AddInt32(&c.refCount, 1)
}
875704
func (pool *LoadBalancedPool) markInstanceUp(
	idx int, instance *instancePool) {
	pool.markInstanceDown(idx, instance, 0)
}
401464
func (c *conn) MarkAsAlive() {
	c.Lock()
	c.dead = false
	c.Unlock()
}
17485
func EOFAsNil(err error) error {
	if terror.ErrorEqual(err, io.EOF) {
		return nil
	}
	return errors.Trace(err)
}
1052456
func (scw *LegacySplitCloneWorker) StatusAsText() string {
	state := scw.State()

	result := "Working on: " + scw.keyspace + "/" + scw.shard + "\n"
	result += "State: " + state.String() + "\n"
	switch state {
	case WorkerStateCloneOnline:
		result += "Running:\n"
		result += "Copying from: " + scw.formatSources() + "\n"
		statuses, eta := scw.tableStatusList.format()
		result += "ETA: " + eta.String() + "\n"
		result += strings.Join(statuses, "\n")
	case WorkerStateDone:
		result += "Success:\n"
		statuses, _ := scw.tableStatusList.format()
		result += strings.Join(statuses, "\n")
	}
	return result
}
1016980
func (msdw *MultiSplitDiffWorker) StatusAsHTML() template.HTML {
	state := msdw.State()

	result := "<b>Working on:</b> " + msdw.keyspace + "/" + msdw.shard + "</br>\n"
	result += "<b>State:</b> " + state.String() + "</br>\n"
	switch state {
	case WorkerStateDiff:
		result += "<b>Running...</b></br>\n"
	case WorkerStateDiffWillFail:
		result += "Running - have already found differences...\n"
	case WorkerStateDone:
		result += "<b>Success.</b></br>\n"
	}

	return template.HTML(result)
}