morningman commented on a change in pull request #2763: [Alter]Add wait time
while doing alter options
URL: https://github.com/apache/incubator-doris/pull/2763#discussion_r367437783
##########
File path: fe/src/main/java/org/apache/doris/clone/TabletChecker.java
##########
@@ -356,71 +368,72 @@ private void removePriosIfNecessary() {
* when being scheduled.
*/
public void repairTable(AdminRepairTableStmt stmt) throws DdlException {
- Catalog catalog = Catalog.getCurrentCatalog();
- Database db = catalog.getDb(stmt.getDbName());
- if (db == null) {
- throw new DdlException("Database " + stmt.getDbName() + " does not
exist");
- }
+ RepairTabletInfo repairTabletInfo =
getRepairTabletInfo(stmt.getDbName(), stmt.getTblName(), stmt.getPartitions());
+ addPrios(repairTabletInfo.dbId, repairTabletInfo.tblId,
repairTabletInfo.partIds, stmt.getTimeoutS() * 1000);
Review comment:
Why not just pass the entire `repairTabletInfo`? instead of each field of
`repairTabletInfo`?
And `addPrios()` can be a private method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]