Skip to content

Commit f42413d

Browse files
committed
Revert "{179084052}: Closing inactive in-process cached connections"
This reverts commit 6235d86. Signed-off-by: Rivers Zhang <hzhang320@bloomberg.net> # Conflicts: # db/db_tunables.h
1 parent a0633a4 commit f42413d

4 files changed

Lines changed: 1 addition & 17 deletions

File tree

db/db_tunables.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ extern int gbl_noleader_retry_duration_ms;
379379
extern int gbl_noleader_retry_poll_ms;
380380

381381
extern char *gbl_iam_dbname;
382-
extern int gbl_inproc_conn_ttl;
383382

384383
/* util/ctrace.c */
385384
extern int nlogs;

db/db_tunables.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,8 +2554,6 @@ REGISTER_TUNABLE("iam_dbname",
25542554
"override dbname for IAM",
25552555
TUNABLE_STRING, &gbl_iam_dbname, READEARLY | READONLY, NULL,
25562556
NULL, NULL, NULL);
2557-
REGISTER_TUNABLE("inproc_conn_ttl", "Close in-process cached connections after this many seconds of inactivity (Default: 10s)",
2558-
TUNABLE_INTEGER, &gbl_inproc_conn_ttl, 0, NULL, NULL, NULL, NULL);
25592557
REGISTER_TUNABLE("comdb2_oplog_preserve_seqno", "Preserve max value of the seqno in llmeta", TUNABLE_BOOLEAN, &gbl_comdb2_oplog_preserve_seqno, INTERNAL, NULL, NULL, NULL, NULL);
25602558
REGISTER_TUNABLE("queue_nonodh_scan_limit", "For comdb2_queues, stop queue scan at this depth (Default: 10000)", TUNABLE_INTEGER, &gbl_nonodh_queue_scan_limit, 0, NULL, NULL, NULL, NULL);
25612559
#endif /* _DB_TUNABLES_H */

plugins/newsql/newsql_evbuffer.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -936,31 +936,19 @@ static void rd_payload(int dummyfd, short what, void *arg)
936936
process_newsql_payload(appdata, query);
937937
}
938938

939-
/* 10-second in-process cache TTL (does not affect idle connections or connections held by sockpool) */
940-
int gbl_inproc_conn_ttl = 10;
941939
static void rd_hdr(int dummyfd, short what, void *arg)
942940
{
943941
struct newsqlheader hdr;
944942
struct newsql_appdata_evbuffer *appdata = arg;
945-
struct sqlclntstate *clnt = &appdata->clnt;
946-
947943
if (evbuffer_get_length(appdata->rd_buf) >= sizeof(struct newsqlheader)) {
948944
goto hdr;
949945
}
950-
if (dummyfd >= 0 && (what & EV_TIMEOUT) && clnt->in_local_cache) {
951-
newsql_cleanup(appdata);
952-
return;
953-
}
954946
if (rd_evbuffer(appdata) <= 0 && (what & EV_READ)) {
955947
newsql_cleanup(appdata);
956948
return;
957949
}
958950
if (evbuffer_get_length(appdata->rd_buf) < sizeof(struct newsqlheader)) {
959-
struct timeval idle_evbuffer_time = {
960-
.tv_sec = gbl_inproc_conn_ttl,
961-
.tv_usec = 0
962-
};
963-
add_rd_event(appdata, appdata->rd_hdr_ev, ((gbl_inproc_conn_ttl <= 0) ? NULL : &idle_evbuffer_time));
951+
add_rd_event(appdata, appdata->rd_hdr_ev, NULL);
964952
return;
965953
}
966954
hdr:

tests/tunables.test/t00_all_tunables.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@
448448
(name='init_with_time_based_genids', description='Enables time-based GENIDs', type='BOOLEAN', value='OFF', read_only='Y')
449449
(name='inline_mtraps', description='inline_mtraps', type='BOOLEAN', value='OFF', read_only='N')
450450
(name='inmem_repdb_memory', description='Current memory usage of in-memory repdb. (Default: 0)', type='INTEGER', value='0', read_only='Y')
451-
(name='inproc_conn_ttl', description='Close in-process cached connections after this many seconds of inactivity (Default: 10s)', type='INTEGER', value='10', read_only='N')
452451
(name='instant_schema_change', description='When possible (eg: when just adding fields) schema change will not rebuild the underlying tables. (Default: on)', type='BOOLEAN', value='ON', read_only='Y')
453452
(name='iomap_enabled', description='Map file that tells comdb2ar to pause while we fsync', type='BOOLEAN', value='ON', read_only='N')
454453
(name='ioqueue', description='Maximum depth of the I/O prefaulting queue. (Default: 0)', type='INTEGER', value='0', read_only='Y')

0 commit comments

Comments
 (0)