Skip to content

Commit a394960

Browse files
committed
Double default authn/authz cache sizes (1000/4000)
Signed-off-by: mkhullar <mohit.khullar@gmail.com>
1 parent ee13d6f commit a394960

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

db/comdb2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ int gbl_externalauth_warn = 0;
250250
int gbl_consumer_auth_warnonly = 1;
251251
int gbl_admin_bypass_externalauth = 0;
252252
int gbl_passwords_with_externalauth = 0;
253-
int gbl_identity_cache_max = 500;
254-
int gbl_authorization_cache_max = 2000;
253+
int gbl_identity_cache_max = 1000;
254+
int gbl_authorization_cache_max = 4000;
255255
int gbl_authentication_cache_ageout = 900;
256256
int gbl_authorization_cache_ageout = 600;
257257
int gbl_cache_authz_perms = 1;

db/db_tunables.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,14 +2486,14 @@ REGISTER_TUNABLE("sqlite_use_temptable_for_rowset",
24862486
"Use temptable instead of sqlite's binary search tree, for recording rowids (Default: ON)",
24872487
TUNABLE_BOOLEAN, &gbl_sqlite_use_temptable_for_rowset, 0, NULL, NULL, NULL, NULL);
24882488

2489-
REGISTER_TUNABLE("max_identity_cache", "Max cache size of externalauth identities (Default: 500)",
2490-
TUNABLE_INTEGER, &gbl_identity_cache_max, READONLY, NULL, NULL, NULL, NULL);
2489+
REGISTER_TUNABLE("max_identity_cache", "Max cache size of externalauth identities (Default: 1000)", TUNABLE_INTEGER,
2490+
&gbl_identity_cache_max, READONLY, NULL, NULL, NULL, NULL);
24912491

24922492
REGISTER_TUNABLE("authentication_cache_ageout", "Max age of authentication cache (Default: 900 seconds)",
24932493
TUNABLE_INTEGER, &gbl_authentication_cache_ageout, 0, NULL, NULL, NULL, NULL);
24942494

2495-
REGISTER_TUNABLE("max_authorization_cache", "Max cache size of authorized identities (Default: 2000)",
2496-
TUNABLE_INTEGER, &gbl_authorization_cache_max, READONLY, NULL, NULL, NULL, NULL);
2495+
REGISTER_TUNABLE("max_authorization_cache", "Max cache size of authorized identities (Default: 4000)", TUNABLE_INTEGER,
2496+
&gbl_authorization_cache_max, READONLY, NULL, NULL, NULL, NULL);
24972497

24982498
REGISTER_TUNABLE("authz_cache", "Enable per query caching of authorized tables. (Default: on)",
24992499
TUNABLE_BOOLEAN, &gbl_cache_authz_perms, 0, NULL, NULL, NULL, NULL);

tests/tunables.test/t00_all_tunables.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,10 @@
553553
(name='master_swing_osql_verbose', description='Produce verbose trace for SQL handlers detecting a master change. (Default: off)', type='BOOLEAN', value='ON', read_only='Y')
554554
(name='master_swing_osql_verbose_off', description='Disables 'master_swing_osql_verbose'', type='BOOLEAN', value='OFF', read_only='N')
555555
(name='master_swing_sock_restart_sleep', description='For testing: sleep in osql_sock_restart when master swings', type='INTEGER', value='0', read_only='Y')
556-
(name='max_authorization_cache', description='Max cache size of authorized identities (Default: 2000)', type='INTEGER', value='2000', read_only='Y')
556+
(name='max_authorization_cache', description='Max cache size of authorized identities (Default: 4000)', type='INTEGER', value='4000', read_only='Y')
557557
(name='max_cascaded_rows_per_txn', description='Set the max cascaded rows updated per transaction.', type='INTEGER', value='0', read_only='N')
558558
(name='max_clientstats', description='Max number of client stats stored in comdb2_clientstats. (Default: 10000)', type='INTEGER', value='10000', read_only='N')
559-
(name='max_identity_cache', description='Max cache size of externalauth identities (Default: 500)', type='INTEGER', value='500', read_only='Y')
559+
(name='max_identity_cache', description='Max cache size of externalauth identities (Default: 1000)', type='INTEGER', value='1000', read_only='Y')
560560
(name='max_incoherent_nodes', description='', type='INTEGER', value='1', read_only='Y')
561561
(name='max_incoherent_slow', description='Sets maximum number of incoherent-slow nodes. (Default: 3)', type='INTEGER', value='3', read_only='N')
562562
(name='max_key_size_new', description='Use new logic for checking max key size (Default: on)', type='INTEGER', value='1', read_only='N')

0 commit comments

Comments
 (0)