Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Lloyd-Pottiger <[email protected]>
  • Loading branch information
Lloyd-Pottiger committed Aug 30, 2024
1 parent c44eeea commit 2a8f66f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dbms/src/Storages/DeltaMerge/LocalIndexerScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ LocalIndexerScheduler::ScheduleResult LocalIndexerScheduler::scheduleNextTask(st
if (last_schedule_table_id_by_ks.find(keyspace_id) != last_schedule_table_id_by_ks.end())
last_schedule_table_id = last_schedule_table_id_by_ks[keyspace_id];

auto table_it = tasks_by_table.upper_bound(last_schedule_table_id);
// Try to finish all tasks in the last table before moving to the next table.
auto table_it = tasks_by_table.find(last_schedule_table_id);
if (table_it == tasks_by_table.end())
table_it = tasks_by_table.begin();
const TableID table_id = table_it->first;
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/DeltaMerge/LocalIndexerScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class LocalIndexerScheduler
size_t pool_current_memory = 0;

size_t all_tasks_count = 0; // ready_tasks + unready_tasks
/// Schedule farely according to keyspace_id, and then according to table_id.
/// Schedule fairly according to keyspace_id, and then according to table_id.
std::map<KeyspaceID, std::map<TableID, std::list<InternalTaskPtr>>> ready_tasks{};
/// When the scheduler will stop waiting and try to schedule again?
/// 1. When a new task is added (and pool is not full)
Expand Down

0 comments on commit 2a8f66f

Please sign in to comment.