| 103 | } |
| 104 | |
| 105 | void |
| 106 | ParentSelectionStrategy::markParentUp(ParentResult *result) |
| 107 | { |
| 108 | pRecord *pRec, *parents = result->rec->selection_strategy->getParents(result); |
| 109 | int num_parents = result->rec->selection_strategy->numParents(result); |
| 110 | |
| 111 | // Make sure that we are being called back with a |
| 112 | // result structure with a parent that is being retried |
| 113 | ink_release_assert(result->retry == true); |
| 114 | ink_assert(result->result == PARENT_SPECIFIED); |
| 115 | if (result->result != PARENT_SPECIFIED) { |
| 116 | return; |
| 117 | } |
| 118 | // If we were set through the API we currently have not failover |
| 119 | // so just return fail |
| 120 | if (result->is_api_result()) { |
| 121 | ink_assert(0); |
| 122 | return; |
| 123 | } |
| 124 | |
| 125 | ink_assert((int)(result->last_parent) < num_parents); |
| 126 | pRec = parents + result->last_parent; |
| 127 | pRec->available = true; |
| 128 | |
| 129 | pRec->failedAt = static_cast<time_t>(0); |
| 130 | int old_count = pRec->failCount.exchange(0, std::memory_order_relaxed); |
| 131 | // a retry succeeded, just reset retriers |
| 132 | |
| 133 | if (old_count > 0) { |
| 134 | Note("http parent proxy %s:%d restored with request %s", pRec->hostname, pRec->port, result->url); |
| 135 | } |
| 136 | } |
nothing calls this directly
no test coverage detected