Skip to content

Commit b7488da

Browse files
committed
Make blocking-physrep default
Signed-off-by: Mark Hannum <[email protected]>
1 parent 7803598 commit b7488da

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

db/phys_rep.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ typedef struct DB_Connection {
5757
int gbl_physrep_debug = 0;
5858
int gbl_physrep_reconnect_interval = 3600; // force re-registration every hour
5959
int gbl_physrep_reconnect_penalty = 0;
60-
int gbl_blocking_physrep = 0;
60+
int gbl_blocking_physrep = 1;
6161
int gbl_physrep_fanout = 8;
6262
int gbl_physrep_max_candidates = 6;
6363
int gbl_physrep_max_pending_replicants = 10;
@@ -1361,7 +1361,7 @@ static int do_wait_for_reverse_conn(cdb2_hndl_tp *repl_metadb) {
13611361
This is the database/node that to replicant connects to retrieve and
13621362
apply physical logs.
13631363
*/
1364-
int gbl_physrep_pollms = 200;
1364+
int gbl_physrep_pollms = 0;
13651365
extern __thread int physrep_out_of_order;
13661366
static void *physrep_worker(void *args)
13671367
{
@@ -1376,6 +1376,7 @@ static void *physrep_worker(void *args)
13761376
int is_revconn = -1;
13771377
int last_revconn_check = 0;
13781378
int last_update_registry = 0;
1379+
int pollms;
13791380
LOG_INFO info;
13801381
LOG_INFO prev_info;
13811382
DB_Connection *repl_db_cnct = NULL;
@@ -1647,7 +1648,10 @@ static void *physrep_worker(void *args)
16471648
do_truncate = 1;
16481649
}
16491650
sleep_and_retry:
1650-
poll(0, 0, gbl_physrep_pollms);
1651+
pollms = gbl_physrep_pollms;
1652+
if (pollms > 0) {
1653+
poll(0, 0, pollms);
1654+
}
16511655
}
16521656

16531657
if (repl_db_connected == 1) {

tests/tunables.test/t00_all_tunables.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
(name='blobmem_sz_thresh_kb', description='Sets the threshold (in KB) above which blobs are allocated by the blob allocator. (Default: 0)', type='INTEGER', value='-1', read_only='Y')
8383
(name='blobstripe', description='', type='BOOLEAN', value='ON', read_only='Y')
8484
(name='blocking_latches', description='Block on latch rather than deadlock', type='BOOLEAN', value='OFF', read_only='N')
85-
(name='blocking_physrep', description='Physical replicant blocks on select. (Default: off)', type='BOOLEAN', value='OFF', read_only='N')
85+
(name='blocking_physrep', description='Physical replicant blocks on select. (Default: off)', type='BOOLEAN', value='ON', read_only='N')
8686
(name='broadcast_check_rmtpol', description='Check rmtpol before sending triggers', type='BOOLEAN', value='ON', read_only='N')
8787
(name='broken_max_rec_sz', description='', type='INTEGER', value='0', read_only='Y')
8888
(name='broken_num_parser', description='', type='BOOLEAN', value='OFF', read_only='Y')
@@ -742,7 +742,7 @@
742742
(name='physrep_max_rollback', description='Maximum logs physrep can rollback. (Default: 0)', type='INTEGER', value='0', read_only='N')
743743
(name='physrep_metadb_host', description='List of physical replication metadb cluster hosts.', type='STRING', value=NULL, read_only='Y')
744744
(name='physrep_metadb_name', description='Physical replication metadb cluster name.', type='STRING', value=NULL, read_only='Y')
745-
(name='physrep_pollms', description='Physical replicant poll interval in milliseconds. (Default: 200)', type='INTEGER', value='200', read_only='N')
745+
(name='physrep_pollms', description='Physical replicant poll interval in milliseconds. (Default: 200)', type='INTEGER', value='0', read_only='N')
746746
(name='physrep_reconnect_interval', description='Reconnect interval for physical replicants (Default: 600)', type='INTEGER', value='3600', read_only='N')
747747
(name='physrep_reconnect_penalty', description='Physrep wait seconds before retry to the same node. (Default: 5)', type='INTEGER', value='0', read_only='N')
748748
(name='physrep_repl_host', description='Current physrep host.', type='STRING', value=NULL, read_only='Y')

0 commit comments

Comments
 (0)