Skip to content

Commit

Permalink
Fix the inconsistency issue between the values of parameters pageNum …
Browse files Browse the repository at this point in the history
…and pageSize in 'PageHelper#startPage' and the TableMetaMapper#selectTableRuntimesForOptimizerGroup,OptimizingMapper#selectOptimizingProcesses
  • Loading branch information
张文领 committed Dec 6, 2024
1 parent 604d1c1 commit 8fe4573
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,7 @@ public Pair<List<OptimizingProcessInfo>, Integer> getOptimizingProcessesInfo(
tableIdentifier.getDatabase(),
tableIdentifier.getTableName(),
type,
status,
offset,
limit));
status));
PageInfo<OptimizingProcessMeta> pageInfo = new PageInfo<>(processMetaList);
total = (int) pageInfo.getTotal();
LOG.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ List<OptimizingProcessMeta> selectOptimizingProcesses(
@Param("dbName") String dbName,
@Param("tableName") String tableName,
@Param("optimizingType") String optimizingType,
@Param("optimizingStatus") ProcessStatus optimizingStatus,
@Param("pageNum") int pageNum,
@Param("pageSize") int pageSize);
@Param("optimizingStatus") ProcessStatus optimizingStatus);

/** Optimizing TaskRuntime operation below */
@Insert({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,5 @@ List<TableRuntimeMeta> selectTableRuntimesForOptimizerGroup(
@Param("optimizerGroup") String optimizerGroup,
@Param("fuzzyDbName") String fuzzyDbName,
@Param("fuzzyTableName") String fuzzyTableName,
@Param("statusCodeFilter") List<Integer> statusCodeFilter,
@Param("pageNum") int pageNum,
@Param("pageSize") int pageSize);
@Param("statusCodeFilter") List<Integer> statusCodeFilter);
}
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,7 @@ public Pair<List<TableRuntimeMeta>, Integer> getTableRuntimes(
TableMetaMapper.class,
mapper ->
mapper.selectTableRuntimesForOptimizerGroup(
optimizerGroup,
fuzzyDbName,
fuzzyTableName,
statusCodeFilters,
limit,
offset));
optimizerGroup, fuzzyDbName, fuzzyTableName, statusCodeFilters));
PageInfo<TableRuntimeMeta> pageInfo = new PageInfo<>(ret);
total = (int) pageInfo.getTotal();
return Pair.of(ret, total);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ protected OptimizingProcessMeta waitOptimizeResult() {
tableIdentifier.getDatabase(),
tableIdentifier.getTableName(),
null,
null,
0,
Integer.MAX_VALUE));
null));
if (tableOptimizingProcesses == null || tableOptimizingProcesses.isEmpty()) {
LOG.info("optimize history is empty");
return Status.RUNNING;
Expand Down Expand Up @@ -161,9 +159,7 @@ protected OptimizingProcessMeta waitOptimizeResult() {
tableIdentifier.getDatabase(),
tableIdentifier.getTableName(),
null,
null,
0,
Integer.MAX_VALUE))
null))
.stream()
.filter(p -> p.getProcessId() > lastProcessId)
.filter(p -> p.getStatus().equals(ProcessStatus.SUCCESS))
Expand Down Expand Up @@ -194,9 +190,7 @@ protected void assertOptimizeHangUp() {
tableIdentifier.getDatabase(),
tableIdentifier.getTableName(),
null,
null,
0,
Integer.MAX_VALUE))
null))
.stream()
.filter(p -> p.getProcessId() > lastProcessId)
.collect(Collectors.toList());
Expand Down

0 comments on commit 8fe4573

Please sign in to comment.