Skip to content

Commit a70a106

Browse files
Allow parallel_count=0 to skip query workers while still running checkpoint validation
When parallel_count is 0, no query workers are spawned and throughput metric returns 0. Checkpoint validation continues to run from the ETL pipeline loop using its own executor, unaffected by the absence of query workers.
1 parent bac5948 commit a70a106

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

  • crates/test-framework/src/spicetest/datasets
  • src/commands/load

crates/test-framework/src/spicetest/datasets/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,6 @@ impl SpiceTest<NotStarted> {
266266
return Err(anyhow::anyhow!("Query set is empty"));
267267
}
268268

269-
if self.state.parallel_count == 0 {
270-
return Err(anyhow::anyhow!("Parallel count must be greater than 0"));
271-
}
272-
273269
// Ensure executor is configured
274270
let executor = self
275271
.state
@@ -481,6 +477,9 @@ impl SpiceTest<Completed> {
481477
}
482478

483479
pub fn get_throughput_metric(&self, scale: f64) -> Result<f64> {
480+
if self.state.parallel_count == 0 {
481+
return Ok(0.0);
482+
}
484483
// metric = (Parallel Query Count * Test Suite Query Count * 3600) / Cs * Scale
485484
let lhs = self.state.parallel_count * self.state.query_count * 3600;
486485

src/commands/load/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ pub(crate) async fn run(
10841084
);
10851085
}
10861086
}
1087-
} else if !has_checkpoint_validation {
1087+
} else if !has_checkpoint_validation && common_args.concurrency > 0 {
10881088
// When results validation is not enabled, wait for
10891089
// at least 1 query set iteration to complete so we
10901090
// collect meaningful query metrics before stopping.

0 commit comments

Comments
 (0)