/* * Request the fault-prober to suspend probes -- no fault actions will * be taken based on in-flight probes until the prober is unpaused. */ bool gpvars_assign_gp_fts_probe_pause(bool newval, bool doit, GucSource source) { if (doit) { /* * We only want to do fancy stuff on the master (where we have a prober). */ if (ftsProbeInfo && AmIMaster()) { /* * fts_pauseProbes is externally set/cleared; * fts_cancelProbes is externally set and cleared by FTS */ ftsLock(); ftsProbeInfo->fts_pauseProbes = newval; ftsProbeInfo->fts_discardResults = ftsProbeInfo->fts_discardResults || newval; ftsUnlock(); /* * If we're unpausing, we want to force the prober to * re-read everything. (we want FtsNotifyProber()). */ if (!newval) { FtsNotifyProber(); } } gp_fts_probe_pause = newval; } return true; }
/* * Test-Connection: This is called from the threaded context inside the * dispatcher: ONLY CALL THREADSAFE FUNCTIONS -- elog() is NOT threadsafe. */ bool FtsTestConnection(CdbComponentDatabaseInfo *failedDBInfo, bool fullScan) { /* master is always reported as alive */ if (failedDBInfo->segindex == MASTER_SEGMENT_ID) { return true; } if (!fullScan) { return FTS_STATUS_ISALIVE(failedDBInfo->dbid, ftsProbeInfo->fts_status); } FtsNotifyProber(); return FTS_STATUS_ISALIVE(failedDBInfo->dbid, ftsProbeInfo->fts_status); }