File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,8 @@ where
352352 id : ClusterId ,
353353 config : ClusterConfig ,
354354 ) -> Result < ( ) , anyhow:: Error > {
355- self . storage . create_instance ( id) ;
355+ self . storage
356+ . create_instance ( id, config. workload_class . clone ( ) ) ;
356357 self . compute
357358 . create_instance ( id, config. arranged_logs , config. workload_class ) ?;
358359 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ pub trait StorageController: Debug {
373373 /// created with zero replicas.
374374 ///
375375 /// Panics if a storage instance with the given ID already exists.
376- fn create_instance ( & mut self , id : StorageInstanceId ) ;
376+ fn create_instance ( & mut self , id : StorageInstanceId , workload_class : Option < String > ) ;
377377
378378 /// Drops the storage instance with the given ID.
379379 ///
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ where
119119{
120120 /// Creates a new [`Instance`].
121121 pub fn new (
122+ workload_class : Option < String > ,
122123 envd_epoch : NonZeroI64 ,
123124 metrics : InstanceMetrics ,
124125 dyncfg : Arc < ConfigSet > ,
@@ -130,7 +131,7 @@ where
130131 let epoch = ClusterStartupEpoch :: new ( envd_epoch, 0 ) ;
131132
132133 let mut instance = Self {
133- workload_class : None ,
134+ workload_class,
134135 replicas : Default :: default ( ) ,
135136 active_ingestions : Default :: default ( ) ,
136137 ingestion_exports : Default :: default ( ) ,
Original file line number Diff line number Diff line change @@ -508,9 +508,10 @@ where
508508 self . storage_collections . check_exists ( id)
509509 }
510510
511- fn create_instance ( & mut self , id : StorageInstanceId ) {
511+ fn create_instance ( & mut self , id : StorageInstanceId , workload_class : Option < String > ) {
512512 let metrics = self . metrics . for_instance ( id) ;
513513 let mut instance = Instance :: new (
514+ workload_class,
514515 self . envd_epoch ,
515516 metrics,
516517 Arc :: clone ( self . config ( ) . config_set ( ) ) ,
You can’t perform that action at this time.
0 commit comments