Skip to content

Commit

Permalink
Bugfix. Correct wrong method call from scheduleTask() to scheduleTask…
Browse files Browse the repository at this point in the history
…ForDatabase() (apache#12791)

* Bugfix. Fix the wrong method call

* reassign accidentally removed deprecated annotation
  • Loading branch information
shounakmk219 authored Apr 4, 2024
1 parent 4306a6f commit 70cfaca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ public Map<String, String> scheduleTasks(@ApiParam(value = "Task type") @QueryPa
// Schedule task for the given task type
List<String> taskNames = tableName != null
? _pinotTaskManager.scheduleTask(taskType, DatabaseUtils.translateTableName(tableName, headers))
: _pinotTaskManager.scheduleTask(taskType, database);
: _pinotTaskManager.scheduleTaskForDatabase(taskType, database);
return Collections.singletonMap(taskType, taskNames == null ? null : StringUtils.join(taskNames, ','));
} else {
// Schedule tasks for all task types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ public void registerTaskGenerator(PinotTaskGenerator taskGenerator) {
* It might be called from the non-leader controller.
* Returns a map from the task type to the list of tasks scheduled.
*/
@Deprecated
public synchronized Map<String, List<String>> scheduleTasks() {
return scheduleTasks(_pinotHelixResourceManager.getAllTables(CommonConstants.DEFAULT_DATABASE), false);
}
Expand Down

0 comments on commit 70cfaca

Please sign in to comment.