mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-22 07:50:38 +00:00
chore: update comment
This commit is contained in:
@@ -172,7 +172,6 @@ pub(crate) fn scan_file_ranges(
|
||||
let build_reader_start = Instant::now();
|
||||
let reader = range.reader(stream_ctx.input.series_row_selector).await?;
|
||||
let build_cost = build_reader_start.elapsed();
|
||||
// common_telemetry::info!("DEBUG_SCAN: scan file ranges, build reader, file_id: {}, index: {:?}, build_cost: {:?}", range.file_handle().file_id(), index, build_cost);
|
||||
part_metrics.inc_build_reader_cost(build_cost);
|
||||
let compat_batch = range.compat_batch();
|
||||
let mut source = Source::PruneReader(reader);
|
||||
|
||||
@@ -197,7 +197,7 @@ impl SeqScan {
|
||||
|
||||
let stream_ctx = self.stream_ctx.clone();
|
||||
let semaphore = if self.properties.target_partitions() > self.properties.num_partitions() {
|
||||
// We can use addtional tasks to read the data if we have more target partitions than acutal partitions.
|
||||
// We can use additional tasks to read the data if we have more target partitions than actual partitions.
|
||||
// This semaphore is partition level.
|
||||
// We don't use a global semaphore to avoid a partition waiting for others. The final concurrency
|
||||
// of tasks usually won't exceed the target partitions a lot as compaction can reduce the number of
|
||||
|
||||
@@ -108,10 +108,10 @@ impl ParallelizeScan {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
// TODO(yingwen): Update comment.
|
||||
/// Distribute [`PartitionRange`]s to each partition.
|
||||
///
|
||||
/// Currently we use a simple round-robin strategy to assign ranges to partitions.
|
||||
/// Currently we assign ranges to partitions according to their rows so each partition
|
||||
/// has similar number of rows.
|
||||
/// This method may return partitions with smaller number than `expected_partition_num`
|
||||
/// if the number of ranges is smaller than `expected_partition_num`. But this will
|
||||
/// return at least one partition.
|
||||
|
||||
Reference in New Issue
Block a user