code: func (s *SQLStore) updateDBLock() {
  	defer s.wg.Done()
  
  	var (
  		ticker  = time.NewTicker(sqlLockUpdateInterval)
  		hasLock = true
  		err     error
  		failed  int
  	)
  	for {
  		select {
  		case <-ticker.C:
  			hasLock, _, _, err = s.acquireDBLock(false)
  			if !hasLock || err != nil {
  				// If there is no error but we did not get the lock,
  				// something is really wrong, abort right away.
  				stopNow := !hasLock && err == nil
  				if err != nil {
  					failed++
  					s.log.Errorf("Unable to update store lock (failed=%v err=%v)", failed, err)
  				}
  				if stopNow || failed == sqlLockLostCount {
  					if sqlNoPanic {
  						s.log.Fatalf("Aborting")
  						return
  					}
  					panic("lost store lock, aborting")
  				}
  			} else {
  				failed = 0
  			}
  		case <-s.doneCh:
  			ticker.Stop()
  			return
  		}
  	}
  }
docs: // This go-routine updates the DB store lock at regular intervals.