• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/rep/

Lines Matching refs:rep

105 	REP *rep;
125 rep = db_rep->region;
126 if (FLD_ISSET(rep->config, mapped))
156 REP *rep;
182 rep = db_rep->region;
188 if (F_ISSET(rep, REP_F_START_CALLED)) {
201 MUTEX_LOCK(env, rep->mtx_clientdb);
203 orig = rep->config;
205 FLD_SET(rep->config, mapped);
207 FLD_CLR(rep->config, mapped);
215 if (FLD_ISSET(rep->config, REP_C_BULK) &&
225 !FLD_ISSET(rep->config, REP_C_BULK) && lp->bulk_off != 0) {
239 MUTEX_UNLOCK(env, rep->mtx_clientdb);
294 * rep->msg_th - this is the count of threads currently in rep_process_message
295 * rep->handle_cnt - number of threads actively using a dbp in library.
296 * rep->txn_cnt - number of active txns.
326 REP *rep;
338 rep = db_rep->region;
364 if (IS_USING_LEASES(env) && rep->lease_timeout == 0) {
386 if (F_ISSET(rep, REP_F_READY_MSG)) {
394 } else if ((ret = __rep_lockout_msg(env, rep, 0)) != 0)
397 role_chg = (!F_ISSET(rep, REP_F_MASTER) && role == DB_REP_MASTER) ||
398 (!F_ISSET(rep, REP_F_CLIENT) && role == DB_REP_CLIENT);
406 if ((ret = __rep_lockout_api(env, rep)) != 0)
435 rep->gen++;
440 if (rep->egen > rep->gen)
441 rep->gen = rep->egen;
443 !F_ISSET(rep, REP_F_MASTERELECT)) {
449 if (F_ISSET(rep, REP_F_MASTERELECT)) {
450 __rep_elect_done(env, rep, 0);
451 F_CLR(rep, REP_F_MASTERELECT);
453 if (rep->egen <= rep->gen)
454 rep->egen = rep->gen + 1;
457 (u_long)rep->gen, (u_long)rep->egen));
458 if ((ret = __rep_write_gen(env, rep->gen)) != 0)
467 (role_chg || !F_ISSET(rep, REP_F_START_CALLED))) {
481 tmp = (db_timeout_t)((double)rep->lease_timeout /
482 ((double)rep->clock_skew /
483 (double)rep->clock_base));
484 DB_TIMEOUT_TO_TIMESPEC(tmp, &rep->lease_duration);
491 rep->nsites)) != 0)
494 rep->master_id = rep->eid;
502 repflags = F_ISSET(rep, REP_F_READY_API | REP_F_READY_MSG |
505 if (!F_ISSET(rep, REP_F_GROUP_ESTD))
510 rep->flags = repflags;
528 rep->version = DB_REPVERSION;
529 F_CLR(rep, REP_F_READY_MSG);
569 F_CLR(rep, REP_F_READY_API | REP_F_READY_OP);
576 announce = role_chg || rep->master_id == DB_EID_INVALID;
579 rep->master_id = DB_EID_INVALID;
581 repflags = F_ISSET(rep, REP_F_NOARCHIVE | REP_F_READY_MSG |
594 rep->version = oldvers;
597 rep->flags = repflags;
605 (role_chg || !F_ISSET(rep, REP_F_START_CALLED))) {
618 tmp = (db_timeout_t)((double)rep->lease_timeout *
619 ((double)rep->clock_skew /
620 (double)rep->clock_base));
621 DB_TIMEOUT_TO_TIMESPEC(tmp, &rep->lease_duration);
622 if (rep->lease_off != INVALID_ROFF) {
624 R_ADDR(infop, rep->lease_off));
625 rep->lease_off = INVALID_ROFF;
651 MUTEX_LOCK(env, rep->mtx_clientdb);
654 MUTEX_UNLOCK(env, rep->mtx_clientdb);
661 F_CLR(rep, REP_F_READY_MSG);
663 F_CLR(rep, REP_F_READY_API | REP_F_READY_OP);
688 rep->gen = 0;
703 * 'errunlock' label. If we error without holding the rep
707 errunlock: F_CLR(rep, REP_F_READY_MSG);
709 F_CLR(rep, REP_F_READY_API | REP_F_READY_OP);
715 F_SET(rep, REP_F_START_CALLED);
748 REP *rep;
755 rep = db_rep->region;
763 rdbpp = &rep->file_dbp;
918 REP *rep;
926 rep = db_rep->region;
927 if (IS_ZERO_LSN(rep->max_prep_lsn)) {
956 if (rep->max_prep_lsn.file < lsn.file) {
959 ZERO_LSN(rep->max_prep_lsn);
1121 rep->op_cnt++;
1163 REP *rep;
1172 rep = db_rep->region;
1176 *gbytesp = rep->gbytes;
1178 *bytesp = rep->bytes;
1206 REP *rep;
1220 rep = db_rep->region;
1223 rep->gbytes = gbytes;
1224 rep->bytes = bytes;
1245 REP *rep;
1254 rep = db_rep->region;
1255 if (rep != NULL && F_ISSET(rep, REP_F_START_CALLED)) {
1260 rep->config_nsites = n;
1276 REP *rep;
1284 rep = db_rep->region;
1285 *n = rep->config_nsites;
1302 REP *rep;
1308 rep = db_rep->region;
1309 rep->priority = priority;
1325 REP *rep;
1331 rep = db_rep->region;
1332 *priority = rep->priority;
1349 REP *rep;
1354 rep = db_rep->region;
1360 rep->chkpt_delay = timeout;
1366 rep->elect_timeout = timeout;
1372 rep->full_elect_timeout = timeout;
1377 if (REP_ON(env) && F_ISSET(rep, REP_F_START_CALLED)) {
1384 rep->lease_timeout = timeout;
1426 REP *rep;
1430 rep = db_rep->region;
1435 rep->chkpt_delay : db_rep->chkpt_delay;
1439 rep->elect_timeout : db_rep->elect_timeout;
1443 rep->full_elect_timeout : db_rep->full_elect_timeout;
1447 rep->lease_timeout : db_rep->lease_timeout;
1485 REP *rep;
1494 rep = db_rep->region;
1501 DB_TIMESPEC_TO_TIMEOUT((*minp), &rep->request_gap, 0);
1503 DB_TIMESPEC_TO_TIMEOUT((*maxp), &rep->max_gap, 0);
1534 REP *rep;
1548 rep = db_rep->region;
1554 DB_TIMEOUT_TO_TIMESPEC(min, &rep->request_gap);
1555 DB_TIMEOUT_TO_TIMESPEC(max, &rep->max_gap);
1558 MUTEX_LOCK(env, rep->mtx_clientdb);
1563 MUTEX_UNLOCK(env, rep->mtx_clientdb);
1591 REP *rep;
1611 rep = db_rep->region;
1614 rep->eid = eid;
1632 REP *rep;
1638 rep = db_rep->region;
1639 *fast_clockp = rep->clock_skew;
1640 *slow_clockp = rep->clock_base;
1660 REP *rep;
1698 rep = db_rep->region;
1699 if (F_ISSET(rep, REP_F_START_CALLED)) {
1706 rep->clock_skew = fast_clock;
1707 rep->clock_base = slow_clock;
1777 REP *rep;
1791 rep = db_rep->region;
1800 MUTEX_LOCK(env, rep->mtx_clientdb);
1802 MUTEX_UNLOCK(env, rep->mtx_clientdb);
1804 master = rep->master_id;
1812 * We want to hold the rep mutex to test and then clear the
1816 if (!F_ISSET(rep, REP_F_DELAY)) {
1829 F_CLR(rep, REP_F_DELAY);
1830 if (IS_ZERO_LSN(lsn) && FLD_ISSET(rep->config, REP_C_NOAUTOINIT)) {
1831 F_CLR(rep, REP_F_NOARCHIVE | REP_F_RECOVER_MASK);
1844 DB_ASSERT(env, F_ISSET(rep, REP_F_RECOVER_UPDATE));
1848 DB_ASSERT(env, F_ISSET(rep, REP_F_RECOVER_VERIFY));