etcdserver/api/v2store/store.go
func (s *store) Recovery(state []byte) error {
	s.worldLock.Lock()
	defer s.worldLock.Unlock()
	err := json.Unmarshal(state, s)

	if err != nil {
		return err
	}

	s.ttlKeyHeap = newTtlKeyHeap()

	s.Root.recoverAndclean()
	return nil
}
func (s *store) Recovery(state []byte) error {
	s.worldLock.Lock()
	defer s.worldLock.Unlock()
	err := json.Unmarshal(state, s)

	if err != nil {
		return err
	}

	s.ttlKeyHeap = newTtlKeyHeap()

	s.Root.recoverAndclean()
	return nil
}
func ( s * store ) Recovery ( state [ ] byte ) error { s . worldLock . Lock ( ) defer s . worldLock . Unlock ( ) err := json . Unmarshal ( state , s ) if err != nil { return err } s . ttlKeyHeap = newTtlKeyHeap ( ) s . Root . recoverAndclean ( ) return nil }
// Recovery recovers the store system from a static state
// It needs to recover the parent field of the nodes.
// It needs to delete the expired nodes since the saved time and also
// needs to create monitoring go routines.
Recovery recovers the store system from a static state It needs to recover the parent field of the nodes . It needs to delete the expired nodes since the saved time and also needs to create monitoring go routines .