@@ -442,6 +442,8 @@ pub trait ConfigObj: DIService {
442442
443443 fn cachestore_cache_max_size ( & self ) -> u64 ;
444444
445+ fn cachestore_cache_max_entry_size ( & self ) -> usize ;
446+
445447 fn cachestore_cache_compaction_trigger_size ( & self ) -> u64 ;
446448
447449 fn cachestore_cache_max_keys ( & self ) -> u32 ;
@@ -582,6 +584,7 @@ pub struct ConfigObjImpl {
582584 pub cachestore_cache_eviction_loop_interval : u64 ,
583585 pub cachestore_cache_ttl_persist_loop_interval : u64 ,
584586 pub cachestore_cache_max_size : u64 ,
587+ pub cachestore_cache_max_entry_size : usize ,
585588 pub cachestore_cache_compaction_trigger_size : u64 ,
586589 pub cachestore_cache_threshold_to_force_eviction : u8 ,
587590 pub cachestore_queue_results_expire : u64 ,
@@ -798,6 +801,10 @@ impl ConfigObj for ConfigObjImpl {
798801 self . cachestore_cache_max_size
799802 }
800803
804+ fn cachestore_cache_max_entry_size ( & self ) -> usize {
805+ self . cachestore_cache_max_entry_size
806+ }
807+
801808 fn cachestore_cache_compaction_trigger_size ( & self ) -> u64 {
802809 self . cachestore_cache_compaction_trigger_size
803810 }
@@ -1151,6 +1158,20 @@ impl Config {
11511158 Some ( 32 << 20 ) ,
11521159 ) ;
11531160
1161+ let transport_max_message_size = env_parse_size (
1162+ "CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE" ,
1163+ 64 << 20 ,
1164+ Some ( 256 << 20 ) ,
1165+ Some ( 16 << 20 ) ,
1166+ ) ;
1167+
1168+ let cachestore_cache_max_entry_size = env_parse_size (
1169+ "CUBESTORE_CACHE_MAX_ENTRY_SIZE" ,
1170+ ( 64 << 20 ) - ( 1024 << 10 ) ,
1171+ Some ( transport_max_message_size - ( 1024 << 10 ) ) ,
1172+ None ,
1173+ ) ;
1174+
11541175 let cachestore_cache_compaction_trigger_size = env_parse_size (
11551176 "CUBESTORE_CACHE_COMPACTION_TRIGGER_SIZE" ,
11561177 Self :: calculate_cache_compaction_trigger_size ( cachestore_cache_max_size) ,
@@ -1322,6 +1343,7 @@ impl Config {
13221343 Some ( 0 ) ,
13231344 ) ,
13241345 cachestore_cache_max_size : cachestore_cache_max_size as u64 ,
1346+ cachestore_cache_max_entry_size,
13251347 cachestore_cache_compaction_trigger_size,
13261348 cachestore_cache_threshold_to_force_eviction : 25 ,
13271349 cachestore_queue_results_expire : env_parse_duration (
@@ -1441,15 +1463,10 @@ impl Config {
14411463 * 1024
14421464 * 1024 ,
14431465 disk_space_cache_duration_secs : 300 ,
1444- transport_max_message_size : env_parse_size (
1445- "CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE" ,
1446- 64 << 20 ,
1447- Some ( 256 << 20 ) ,
1448- Some ( 16 << 20 ) ,
1449- ) ,
1466+ transport_max_message_size,
14501467 transport_max_frame_size : env_parse_size (
14511468 "CUBESTORE_TRANSPORT_MAX_FRAME_SIZE" ,
1452- 32 << 20 ,
1469+ 64 << 20 ,
14531470 Some ( 256 << 20 ) ,
14541471 Some ( 4 << 20 ) ,
14551472 ) ,
@@ -1535,6 +1552,7 @@ impl Config {
15351552 cachestore_cache_eviction_loop_interval : 60 ,
15361553 cachestore_cache_ttl_persist_loop_interval : 15 ,
15371554 cachestore_cache_max_size : 4096 << 20 ,
1555+ cachestore_cache_max_entry_size : 64 << 20 ,
15381556 cachestore_cache_compaction_trigger_size : 4096 * 2 << 20 ,
15391557 cachestore_cache_threshold_to_force_eviction : 25 ,
15401558 cachestore_queue_results_expire : 90 ,
0 commit comments