@@ -103,6 +103,12 @@ struct MasterConfig {
103103 // Offload-on-evict: defer LOCAL_DISK offload to eviction time
104104 bool offload_on_evict = false ;
105105 bool offload_force_evict = false ;
106+
107+ // Promotion-on-hit: when Get observes a LOCAL_DISK-only key, queue an
108+ // async copy back to MEMORY so the next Get is fast.
109+ bool promotion_on_hit = false ;
110+ uint32_t promotion_admission_threshold = 2 ;
111+ uint32_t promotion_queue_limit = 50000 ;
106112};
107113
108114class MasterServiceSupervisorConfig {
@@ -173,6 +179,9 @@ class MasterServiceSupervisorConfig {
173179 bool enable_cxl = false ;
174180 bool offload_on_evict = false ;
175181 bool offload_force_evict = false ;
182+ bool promotion_on_hit = false ;
183+ uint32_t promotion_admission_threshold = 2 ;
184+ uint32_t promotion_queue_limit = 50000 ;
176185 MasterServiceSupervisorConfig () = default;
177186
178187 // From MasterConfig
@@ -197,6 +206,9 @@ class MasterServiceSupervisorConfig {
197206 enable_offload = config.enable_offload ;
198207 offload_on_evict = config.offload_on_evict ;
199208 offload_force_evict = config.offload_force_evict ;
209+ promotion_on_hit = config.promotion_on_hit ;
210+ promotion_admission_threshold = config.promotion_admission_threshold ;
211+ promotion_queue_limit = config.promotion_queue_limit ;
200212 rpc_port = static_cast <int >(config.rpc_port );
201213 rpc_thread_num = static_cast <size_t >(config.rpc_thread_num );
202214
@@ -335,6 +347,9 @@ class WrappedMasterServiceConfig {
335347 bool enable_offload = false ;
336348 bool offload_on_evict = false ;
337349 bool offload_force_evict = false ;
350+ bool promotion_on_hit = false ;
351+ uint32_t promotion_admission_threshold = 2 ;
352+ uint32_t promotion_queue_limit = 50000 ;
338353 std::string ha_backend_type = " etcd" ;
339354 std::string ha_backend_connstring;
340355 std::string cluster_id = DEFAULT_CLUSTER_ID ;
@@ -399,6 +414,9 @@ class WrappedMasterServiceConfig {
399414 enable_offload = config.enable_offload ;
400415 offload_on_evict = config.offload_on_evict ;
401416 offload_force_evict = config.offload_force_evict ;
417+ promotion_on_hit = config.promotion_on_hit ;
418+ promotion_admission_threshold = config.promotion_admission_threshold ;
419+ promotion_queue_limit = config.promotion_queue_limit ;
402420 ha_backend_type = config.ha_backend_type ;
403421 ha_backend_connstring = ResolveConfiguredHABackendConnstring (
404422 ha_backend_type, config.ha_backend_connstring ,
@@ -481,6 +499,9 @@ class WrappedMasterServiceConfig {
481499 enable_offload = config.enable_offload ;
482500 offload_on_evict = config.offload_on_evict ;
483501 offload_force_evict = config.offload_force_evict ;
502+ promotion_on_hit = config.promotion_on_hit ;
503+ promotion_admission_threshold = config.promotion_admission_threshold ;
504+ promotion_queue_limit = config.promotion_queue_limit ;
484505 ha_backend_type = config.ha_backend_type ;
485506 ha_backend_connstring = ResolveConfiguredHABackendConnstring (
486507 ha_backend_type, config.ha_backend_connstring ,
@@ -862,6 +883,9 @@ class MasterServiceConfig {
862883 bool enable_offload = false ;
863884 bool offload_on_evict = false ;
864885 bool offload_force_evict = false ;
886+ bool promotion_on_hit = false ;
887+ uint32_t promotion_admission_threshold = 2 ;
888+ uint32_t promotion_queue_limit = 50000 ;
865889 std::string ha_backend_type = " etcd" ;
866890 std::string ha_backend_connstring;
867891 std::string cluster_id = DEFAULT_CLUSTER_ID ;
@@ -922,6 +946,9 @@ class MasterServiceConfig {
922946 enable_offload = config.enable_offload ;
923947 offload_on_evict = config.offload_on_evict ;
924948 offload_force_evict = config.offload_force_evict ;
949+ promotion_on_hit = config.promotion_on_hit ;
950+ promotion_admission_threshold = config.promotion_admission_threshold ;
951+ promotion_queue_limit = config.promotion_queue_limit ;
925952 ha_backend_type = config.ha_backend_type ;
926953 ha_backend_connstring = config.ha_backend_connstring ;
927954 cluster_id = config.cluster_id ;
0 commit comments