// AreDBsSyncing is a thread-safe way to fetch the boolean in dbsSyncing.
14868
func (wsh *WebsocketHub) AreDBsSyncing() bool {
	syncing, ok := wsh.dbsSyncing.Load().(bool)
	return ok && syncing
}
1115494
func (mysqld *Mysqld) GetDbaConnection() (*dbconnpool.DBConnection, error) {
	return dbconnpool.NewDBConnection(mysqld.dbcfgs.Dba(), dbaMysqlStats)
}
556417
func (lc *LightningChannel) IsPending() bool {
	lc.RLock()
	defer lc.RUnlock()

	return lc.channelState.IsPending
}
745966
func (p *processorListener) shouldResync(now time.Time) bool {
	p.resyncLock.Lock()
	defer p.resyncLock.Unlock()

	if p.resyncPeriod == 0 {
		return false
	}

	return now.After(p.nextResync) || now.Equal(p.nextResync)
}
290243
func (db *SnapshotDB) IsInternalService(c context.Context, hostname string) (bool, error) {
	if db.internalServices == nil {
		return false, nil
	}
	return db.internalServices.MatchString(hostname), nil
}
829246
func (s *GrpcServer) IsRunning() bool {
	s.lock.Lock()
	defer s.lock.Unlock()

	return s.running
}
193024
func (s *stackV1Beta1) IsColliding(servicesClient corev1.ServiceInterface, st Stack) error {
	for _, srv := range st.getServices() {
		if err := verify(servicesClient, st.Name, srv); err != nil {
			return err
		}
	}
	return nil
}
943113
func isRunnable(res *appv1.ResourceResult) bool {
	gvk := res.GroupVersionKind()
	return isBatchJob(gvk) || isArgoWorkflow(gvk) || isPod(gvk)
}
98230
func (tsv *TabletServer) InitDBConfig(target querypb.Target, dbcfgs *dbconfigs.DBConfigs) error {
	tsv.mu.Lock()
	defer tsv.mu.Unlock()
	if tsv.state != StateNotConnected {
		return vterrors.Errorf(vtrpcpb.Code_UNKNOWN, "InitDBConfig failed, current state: %s", stateName[tsv.state])
	}
	tsv.target = target
	tsv.dbconfigs = dbcfgs

	tsv.se.InitDBConfig(tsv.dbconfigs)
	tsv.qe.InitDBConfig(tsv.dbconfigs)
	tsv.teCtrl.InitDBConfig(tsv.dbconfigs)
	tsv.hw.InitDBConfig(tsv.dbconfigs)
	tsv.hr.InitDBConfig(tsv.dbconfigs)
	tsv.messager.InitDBConfig(tsv.dbconfigs)
	tsv.watcher.InitDBConfig(tsv.dbconfigs)
	tsv.vstreamer.InitDBConfig(tsv.dbconfigs)
	return nil
}
1029535
func (qm *QuotaMonitor) IsSynced() bool {
	qm.monitorLock.RLock()
	defer qm.monitorLock.RUnlock()

	if len(qm.monitors) == 0 {
		klog.V(4).Info("quota monitor not synced: no monitors")
		return false
	}

	for resource, monitor := range qm.monitors {
		if !monitor.controller.HasSynced() {
			klog.V(4).Infof("quota monitor not synced: %v", resource)
			return false
		}
	}
	return true
}
318042
func RunSyncdb(name string, force bool, verbose bool) error {
	BootStrap()

	al := getDbAlias(name)
	cmd := new(commandSyncDb)
	cmd.al = al
	cmd.force = force
	cmd.noInfo = !verbose
	cmd.verbose = verbose
	cmd.rtOnError = true
	return cmd.Run()
}
924152
func (i DatabaseInventory) IsReady() bool {
	for _, c := range i.Collections {
		if !c.IsReady {
			return false
		}
	}
	return true
}
15751
func IsPermDbKey(typ ObjType) bool {
	switch typ {
	case DBDiskLRUEntries,
		DBDiskLRUIndex,
		DBOfflineRPC,
		DBChatCollapses,
		DBHasRandomPW,
		DBChatReacji,
		DBStellarDisclaimer,
		DBChatIndex,
		DBBoxAuditorPermanent:
		return true
	default:
		return false
	}
}
148039
func (s *xlSets) isConnected(endpoint Endpoint) bool {
	s.xlDisksMu.RLock()
	defer s.xlDisksMu.RUnlock()

	for i := 0; i < s.setCount; i++ {
		for j := 0; j < s.drivesPerSet; j++ {
			if s.xlDisks[i][j] == nil {
				continue
			}
			var endpointStr string
			if endpoint.IsLocal {
				endpointStr = endpoint.Path
			} else {
				endpointStr = endpoint.String()
			}
			if s.xlDisks[i][j].String() != endpointStr {
				continue
			}
			return s.xlDisks[i][j].IsOnline()
		}
	}
	return false
}
229198
func (nc *Conn) IsDraining() bool {
	nc.mu.RLock()
	defer nc.mu.RUnlock()
	return nc.isDraining()
}
1001771
func (bs *BaseService) IsRunning() bool {
	return atomic.LoadUint32(&bs.started) == 1 && atomic.LoadUint32(&bs.stopped) == 0
}
1176520
func (mBatch *cLevelDBBatch) WriteSync() {
	err := mBatch.db.db.Write(mBatch.db.woSync, mBatch.batch)
	if err != nil {
		panic(err)
	}
}