• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/db-4.7.25.NC/rep/

Lines Matching defs:to

17  * We need to check sites == nsites, not more than half
19 * reason is that we want to process all the incoming votes
40 * Called after master failure to hold/participate in an election for
62 db_timeout_t timeout, to;
86 * Specifying 0 for nsites signals us to use the value configured
88 * it asks us to compute the value representing a simple majority.
98 * scenario of master/1 client to elect the client. Allow
115 * Default to the normal timeout unless the user configured
133 * we're an electable site, but set our priority to 0.
161 * This allows us to unit test the ELECTABLE flag simply by
174 * If leases are configured, wait for them to expire, and
178 to = __rep_lease_waittime(env);
179 if (to != 0) {
184 ret = __rep_wait(env, &to, &eid,
208 * We need to lockout applying incoming log records during
209 * the election. We need to use a special rep_lockout_apply
210 * instead of rep_lockout_msg because we do not want to
216 to = timeout;
242 * init, we participate, but we set our priority to 0
252 "Setting priority 0, unelectable, due to internal init/recovery"));
258 * We are about to participate at this egen. We must
289 ret = __rep_wait(env, &to, &eid, full_elect, REP_F_EPHASE1);
300 if (to > timeout)
301 to = timeout;
302 to = (to * 8) / 10;
305 (u_long)rep->egen, (u_long)to, (u_long)timeout));
308 * means we're probably late to the next election,
312 * Backoff to 80% of the current timeout.
322 * run out of time, so it's time to decide if we have enough
323 * votes to pick a winner and if so, to send out a vote to
328 * If our egen changed while we were waiting. We need to
334 (env, "Egen changed from %lu to %lu",
340 /* We think we've seen enough to cast a vote. */
358 /* We do not have enough votes to elect. */
365 "Not enough votes to elect: recvd %d of %d from %d sites",
372 * We have seen enough vote1's. Now we need to wait
380 * If we are NOT the new master we want to send
381 * our vote to the winner, and wait longer. The
385 * and we want to give the winner enough time to
391 to = to * 2;
401 ret = __rep_wait(env, &to, &eid, full_elect, REP_F_EPHASE2);
411 if (to > timeout)
412 to = timeout;
413 to = (to * 8) / 10;
415 "While waiting egen changed to %lu. Phase 2 New timeout %lu, orig timeout %lu",
417 (u_long)to, (u_long)timeout));
429 "Egen ph2 changed from %lu to %lu",
449 * from elect_init where we were unable to grow_sites. In
450 * that case we do not want to discard all known election info.
458 * If the election finished elsewhere, we need to clear
538 * In 4.7 we changed to having fixed sized u_int32_t's from
559 * send an ALIVE to the old participant.
593 * If this site (sender of the VOTE1) is the first to the party, simply
660 * to do.
752 * We might be the last to the party and we haven't had
753 * time to tally all the vote1's, but others have and
760 * In 4.7 we changed to having fixed sized u_int32_t's from
788 * need to account for:
790 * we want to ignore it.
792 * received a VOTE1, we want to record it, because we simply
794 * but that site got all the votes it needed to send it.
796 * from the same site we want to ignore it.
798 * really voting for us, then we finally get to record it.
859 * However, if we happened to hear from an earlier vote
861 * election we want to keep the updated one. Note that
913 * If we've seen more than one, compare us to the best so far.
914 * If we're the first, make ourselves the winner to start.
920 * we set priority to 0, but set the ELECTABLE flag so that
948 /* Make ourselves the winner to start. */
1024 * If we're the first to the party, we simply set initial
1069 "Got enough votes to win; election done; winner is %d, gen %lu",
1089 * Compute a sleep interval. Set it to the smaller of .5s or
1136 * timed out. However, we want to give other
1137 * changes a chance to return, so if we both
1141 * then we want to return the election completion.
1155 * we need to do more to detect the difference between
1167 * Otherwise, if my phase is over I want to