@@ -868,6 +868,7 @@ pub struct StorageNodeHandleBuilder {
868868 num_checkpoints_per_blob : Option < u32 > ,
869869 enable_node_config_synchronizer : bool ,
870870 node_recovery_config : Option < NodeRecoveryConfig > ,
871+ garbage_collection_config : Option < GarbageCollectionConfig > ,
871872 event_stream_catchup_min_checkpoint_lag : Option < u64 > ,
872873 max_epochs_ahead : Option < u32 > ,
873874}
@@ -962,6 +963,12 @@ impl StorageNodeHandleBuilder {
962963 self
963964 }
964965
966+ /// Sets the garbage collection config for the node.
967+ pub fn with_garbage_collection_config ( mut self , config : GarbageCollectionConfig ) -> Self {
968+ self . garbage_collection_config = Some ( config) ;
969+ self
970+ }
971+
965972 /// Specify the shard assignment for this node.
966973 ///
967974 /// If specified, it will determine the the shard assignment for the node in the committee. If
@@ -1123,7 +1130,9 @@ impl StorageNodeHandleBuilder {
11231130 Default :: default ( )
11241131 } ,
11251132 blob_recovery : BlobRecoveryConfig :: default_for_test ( ) ,
1126- garbage_collection : GarbageCollectionConfig :: default_for_test ( ) ,
1133+ garbage_collection : self
1134+ . garbage_collection_config
1135+ . unwrap_or_else ( || GarbageCollectionConfig :: default_for_test ( ) ) ,
11271136 ..storage_node_config ( ) . inner
11281137 } ;
11291138
@@ -1309,7 +1318,9 @@ impl StorageNodeHandleBuilder {
13091318 storage_node_cap : node_capability. map ( |cap| cap. id ) ,
13101319 node_recovery_config : self . node_recovery_config . clone ( ) . unwrap_or_default ( ) ,
13111320 blob_recovery : BlobRecoveryConfig :: default_for_test ( ) ,
1312- garbage_collection : GarbageCollectionConfig :: default_for_test ( ) ,
1321+ garbage_collection : self
1322+ . garbage_collection_config
1323+ . unwrap_or_else ( || GarbageCollectionConfig :: default_for_test ( ) ) ,
13131324 ..storage_node_config ( ) . inner
13141325 } ;
13151326
@@ -1391,6 +1402,7 @@ impl Default for StorageNodeHandleBuilder {
13911402 num_checkpoints_per_blob : None ,
13921403 enable_node_config_synchronizer : false ,
13931404 node_recovery_config : None ,
1405+ garbage_collection_config : None ,
13941406 event_stream_catchup_min_checkpoint_lag : None ,
13951407 max_epochs_ahead : None ,
13961408 }
0 commit comments