@@ -285,7 +285,7 @@ impl IngestController {
285
285
ingester_pool : IngesterPool ,
286
286
replication_factor : usize ,
287
287
max_shard_ingestion_throughput_mib_per_sec : f32 ,
288
- shard_scaling_factor : f32 ,
288
+ shard_scale_up_factor : f32 ,
289
289
) -> Self {
290
290
IngestController {
291
291
metastore,
@@ -295,7 +295,7 @@ impl IngestController {
295
295
stats : IngestControllerStats :: default ( ) ,
296
296
scaling_arbiter : ScalingArbiter :: with_max_shard_ingestion_throughput_mib_per_sec (
297
297
max_shard_ingestion_throughput_mib_per_sec,
298
- shard_scaling_factor ,
298
+ shard_scale_up_factor ,
299
299
) ,
300
300
}
301
301
}
@@ -673,17 +673,17 @@ impl IngestController {
673
673
shard_stats : ShardStats ,
674
674
model : & mut ControlPlaneModel ,
675
675
progress : & Progress ,
676
- shards_to_create : usize ,
676
+ num_shards_to_open : usize ,
677
677
) -> MetastoreResult < ( ) > {
678
678
if !model
679
- . acquire_scaling_permits ( & source_uid, ScalingMode :: Up ( shards_to_create ) )
679
+ . acquire_scaling_permits ( & source_uid, ScalingMode :: Up ( num_shards_to_open ) )
680
680
. unwrap_or ( false )
681
681
{
682
682
return Ok ( ( ) ) ;
683
683
}
684
- let new_num_open_shards = shard_stats. num_open_shards + shards_to_create ;
684
+ let new_num_open_shards = shard_stats. num_open_shards + num_shards_to_open ;
685
685
let new_shards_per_source: HashMap < SourceUid , usize > =
686
- HashMap :: from_iter ( [ ( source_uid. clone ( ) , shards_to_create ) ] ) ;
686
+ HashMap :: from_iter ( [ ( source_uid. clone ( ) , num_shards_to_open ) ] ) ;
687
687
let successful_source_uids_res = self
688
688
. try_open_shards ( new_shards_per_source, model, & Default :: default ( ) , progress)
689
689
. await ;
@@ -695,7 +695,7 @@ impl IngestController {
695
695
if successful_source_uids. is_empty ( ) {
696
696
// We did not manage to create the shard.
697
697
// We can release our permit.
698
- model. release_scaling_permits ( & source_uid, ScalingMode :: Up ( shards_to_create ) ) ;
698
+ model. release_scaling_permits ( & source_uid, ScalingMode :: Up ( num_shards_to_open ) ) ;
699
699
warn ! (
700
700
index_uid=%source_uid. index_uid,
701
701
source_id=%source_uid. source_id,
@@ -719,7 +719,7 @@ impl IngestController {
719
719
source_id=%source_uid. source_id,
720
720
"scaling up number of shards to {new_num_open_shards} failed: {metastore_error:?}"
721
721
) ;
722
- model. release_scaling_permits ( & source_uid, ScalingMode :: Up ( shards_to_create ) ) ;
722
+ model. release_scaling_permits ( & source_uid, ScalingMode :: Up ( num_shards_to_open ) ) ;
723
723
Err ( metastore_error)
724
724
}
725
725
}
0 commit comments