11/*-
2- * Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
33 *
44 * This file was distributed by Oracle as part of a version of Oracle NoSQL
55 * Database made available at:
@@ -97,17 +97,6 @@ enum ParamContext {CLOUD, ON_PREM, ALL, HIDDEN}
9797 new ParamDef ("httpPort" , "80" , ParamType .INT , ParamContext .ALL );
9898 public static ParamDef HTTPS_PORT =
9999 new ParamDef ("httpsPort" , "443" , ParamType .INT , ParamContext .ALL );
100-
101- /*
102- * This is used to size the number of Netty threads used to handle incoming
103- * requests from the network. If REQUEST_THREAD_POOL_SIZE is 0 these threads
104- * will also be used to handle the requests through sending the request
105- * to KV. In this case the number should be relatively high in order to
106- * keep up with traffic. If REQUEST_THREAD_POOL_SIZE is non-zero
107- * requests are handled using a separate pool. If that is the case this
108- * number can be smaller. If 0 Netty defaults to 2 * nCPUs (maybe 3x,
109- * depending on netty release)
110- */
111100 public static ParamDef NUM_REQUEST_THREADS =
112101 new ParamDef ("numRequestThreads" , "32" , ParamType .INT ,
113102 ParamContext .ALL );
@@ -118,20 +107,6 @@ enum ParamContext {CLOUD, ON_PREM, ALL, HIDDEN}
118107 public static ParamDef MONITOR_STATS_ENABLED =
119108 new ParamDef ("monitorStatsEnabled" , "false" ,
120109 ParamType .BOOL , ParamContext .ALL );
121- /*
122- * Set to non-zero to use a thread pool separate from Netty for handling
123- * requests. The pool is sized based on this parameter
124- */
125- public static ParamDef REQUEST_THREAD_POOL_SIZE =
126- new ParamDef ("requestThreadPoolSize" , "0" , ParamType .INT , ParamContext .ALL );
127- /*
128- * Set to non-zero to use a thread pool to handle async responses from
129- * KV client calls rather than using the KV threads themselves. This
130- * parameter is only used if ASYNC is true
131- */
132- public static ParamDef KV_THREAD_POOL_SIZE =
133- new ParamDef ("kvThreadPoolSize" , "0" ,
134- ParamType .INT , ParamContext .ALL );
135110
136111 /** Wallet file that holds the salt value for the query cache */
137112 public static ParamDef SALT_WALLET =
@@ -325,7 +300,6 @@ enum ParamContext {CLOUD, ON_PREM, ALL, HIDDEN}
325300 * errorCacheSize: Maximum number of unique IP addresses to track
326301 * error rates for.
327302 */
328- @ Deprecated
329303 public static ParamDef ERROR_CACHE_SIZE =
330304 new ParamDef ("errorCacheSize" , "10000" ,
331305 ParamType .INT , ParamContext .CLOUD );
@@ -433,14 +407,6 @@ enum ParamContext {CLOUD, ON_PREM, ALL, HIDDEN}
433407 new ParamDef ("childTableEnabled" , "true" ,
434408 ParamType .BOOL , ParamContext .CLOUD );
435409
436- /**
437- * Cloud only: true if enabled customer managed encryption key(CMEK), it is
438- * disabled by default.
439- */
440- public static ParamDef CMEK_ENABLED =
441- new ParamDef ("cmekEnabled" , "false" ,
442- ParamType .BOOL , ParamContext .CLOUD );
443-
444410 /* ------- End params ---------*/
445411
446412 /*
@@ -844,6 +810,7 @@ public void setNumRequestThreads(int numRequestThreads) {
844810 Integer .toString (numRequestThreads ));
845811 }
846812
813+
847814 public int getNumAcceptThreads () {
848815 return getInt (NUM_ACCEPT_THREADS );
849816 }
@@ -853,24 +820,6 @@ public void setNumAcceptThreads(int numThreads) {
853820 Integer .toString (numThreads ));
854821 }
855822
856- public int getRequestThreadPoolSize () {
857- return getInt (REQUEST_THREAD_POOL_SIZE );
858- }
859-
860- public void setRequestThreadPoolSize (int size ) {
861- paramVals .setProperty (REQUEST_THREAD_POOL_SIZE .paramName ,
862- Integer .toString (size ));
863- }
864-
865- public int getKVThreadPoolSize () {
866- return getInt (KV_THREAD_POOL_SIZE );
867- }
868-
869- public void setKVThreadPoolSize (int size ) {
870- paramVals .setProperty (KV_THREAD_POOL_SIZE .paramName ,
871- Integer .toString (size ));
872- }
873-
874823 public String getHostname () {
875824 return paramVals .getProperty (HOSTNAME .paramName );
876825 }
@@ -1075,6 +1024,10 @@ public int getErrorCreditMs() {
10751024 return getInt (ERROR_CREDIT_MS );
10761025 }
10771026
1027+ public int getErrorCacheSize () {
1028+ return getInt (ERROR_CACHE_SIZE );
1029+ }
1030+
10781031 public int getErrorCacheLifetimeMs () {
10791032 return getInt (ERROR_CACHE_LIFETIME_MS );
10801033 }
@@ -1127,10 +1080,6 @@ public int getTableCacheCheckIntervalSec() {
11271080 return getInt (TABLE_CACHE_CHECK_INTERVAL_SEC );
11281081 }
11291082
1130- public boolean isCmekEnabled () {
1131- return getBool (CMEK_ENABLED );
1132- }
1133-
11341083 /* Helpers to convert a String property value to a type */
11351084 private boolean getBool (ParamDef def ) {
11361085 String val = paramVals .getProperty (def .paramName , def .defaultVal );
@@ -1219,8 +1168,7 @@ KVStoreConfig makeTemplateKVStoreConfig() {
12191168 */
12201169 int requestLimit = getInt (KV_REQUEST_LIMIT );
12211170 if (requestLimit < 0 || getAsync () == false ) {
1222- requestLimit = Math .max (getNumRequestThreads (),
1223- getRequestThreadPoolSize ());
1171+ requestLimit = getNumRequestThreads ();
12241172 }
12251173 if (requestLimit > RequestLimitConfig .DEFAULT_MAX_ACTIVE_REQUESTS ) {
12261174 kvConfig .setRequestLimit (
0 commit comments