// Clear the StatsCache, only for test.
497750
func (h *Handle) Clear() {
	h.mu.Lock()
	h.StatsCache.Store(StatsCache{})
	h.mu.lastVersion = 0
	for len(h.ddlEventCh) > 0 {
		<-h.ddlEventCh
	}
	h.feedback = h.feedback[:0]
	h.mu.ctx.GetSessionVars().InitChunkSize = 1
	h.mu.ctx.GetSessionVars().MaxChunkSize = 32
	h.listHead = &SessionStatsCollector{mapper: make(tableDeltaMap), rateMap: make(errorRateDeltaMap)}
	h.globalMap = make(tableDeltaMap)
	h.mu.rateMap = make(errorRateDeltaMap)
	h.mu.Unlock()
}
483707
func Clear(w http.ResponseWriter, r *http.Request, sess *sessions.Session) {
	// Delete the map if it doesn't exist
	if _, ok := sess.Values[TokenName]; ok {
		delete(sess.Values, TokenName)
		sess.Save(r, w)
	}
}
1077117
func (af *aggFunction) Clear() {
	af.resultMapper = make(aggCtxMapper, 0)
	af.streamCtx = nil
}
402695
func (l *Loader) Clear(ctx context.Context, key Key) Interface {
	l.cacheLock.Lock()
	l.cache.Delete(ctx, key)
	l.cacheLock.Unlock()
	return l
}
634842
func (c *Ctrie) Clear() {
	for {
		root := c.readRoot()
		gen := &generation{}
		newRoot := &iNode{
			main: &mainNode{cNode: &cNode{array: make([]branch, 0), gen: gen}},
			gen:  gen,
		}
		if c.rdcssRoot(root, gcasRead(root, c), newRoot) {
			return
		}
	}
}
582574
func (this *MemoryStore) Clear() error {
	this.l.Lock()
	defer this.l.Unlock()
	this.newMap()
	return nil
}
254927
func (s *GlobConfig) Clear() error {
	key := globalConfigPath
	return s.StateDriver.ClearState(key)
}
389360
func (th *TxHistory) Clear() {
	for i := 0; i < dbtypes.NumIntervals; i++ {
		th.TypeByInterval[i] = nil
		th.AmtFlowByInterval[i] = nil
	}
}
654470
func (t *TxStructure) Clear(key []byte) error {
	if t.readWriter == nil {
		return errWriteOnSnapshot
	}
	ek := t.encodeStringDataKey(key)
	err := t.readWriter.Delete(ek)
	if kv.ErrNotExist.Equal(err) {
		err = nil
	}
	return errors.Trace(err)
}
1163702
func resetStats(stats map[string]*protoStat.ProtoStat) {
	for _, v := range stats {
		if v.GetRepeat() {
			zero := float64(0)
			v.Value = &zero
		}
	}
}
413489
func (s *Session) Clear() {
	s.Lock()
	defer s.Unlock()

	s.uid = ""
	s.data = map[string]interface{}{}
	s.updateEncodedData()
}
95627
func (engine *Engine) ClearCacheBean(bean interface{}, id string) error {
	v := rValue(bean)
	t := v.Type()
	if t.Kind() != reflect.Struct {
		return errors.New("error params")
	}
	tableName := engine.tbName(v)
	table := engine.autoMapType(v)
	cacher := table.Cacher
	if cacher == nil {
		cacher = engine.Cacher
	}
	if cacher != nil {
		cacher.ClearIds(tableName)
		cacher.DelBean(tableName, id)
	}
	return nil
}
73717
func (u *UnschedulablePodsMap) clear() {
	u.podInfoMap = make(map[string]*podInfo)
	if u.metricRecorder != nil {
		u.metricRecorder.Clear()
	}
}
146307
func (r *AutoVXLANCfgResource) Clear() error {
	key := fmt.Sprintf(vXLANResourceConfigPath, r.ID)
	return r.StateDriver.ClearState(key)
}
1086287
func (s *State) clear() {
	*s = State{Inputs: s.Inputs, vars: s.vars}
	s.vars.ClearValues()
}
986789
func (c *DOMStorage) Clear(storageId *DOMStorageStorageId) (*gcdmessage.ChromeResponse, error) {
	var v DOMStorageClearParams
	v.StorageId = storageId
	return c.ClearWithParams(&v)
}
1117101
func (s *CfgServiceLBState) Clear() error {
	key := fmt.Sprintf(serviceLBConfigPath, s.ID)
	err := s.StateDriver.ClearState(key)
	return err
}