Skip to content

Commit

Permalink
feat: 优化分库分表迁移过程中,task_instance_id 动态查询条件构造逻辑 TencentBlueKing#3324
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu096 committed Dec 12, 2024
1 parent 2ed0517 commit 851ea32
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ public static Condition build(Long taskInstanceId,
if (taskInstanceId == null || taskInstanceId <= 0L) {
log.info("TaskInstanceIdDynamicCondition : InvalidTaskInstanceId : {}", taskInstanceId);
// 为了不影响兼容性,忽略错误
// return DSL.trueCondition();
throw new IllegalStateException("TaskInstanceId required");
return DSL.trueCondition();
} else {
log.debug("TaskInstanceIdDynamicCondition: UseTaskInstanceIdCondition");
// 为了便于观察和排查,暂时设定为 INFO 级别,等后续正式交付再改成 DEBUG
log.info("TaskInstanceIdDynamicCondition: UseTaskInstanceIdCondition");
return taskInstanceIdConditionBuilder.apply(taskInstanceId);
}
} else {
log.debug("TaskInstanceIdDynamicCondition: IgnoreTaskInstanceIdCondition");
// 为了便于观察和排查,暂时设定为 INFO 级别,等后续正式交付再改成 DEBUG
log.info("TaskInstanceIdDynamicCondition: IgnoreTaskInstanceIdCondition");
return DSL.trueCondition();
}
}
Expand Down

0 comments on commit 851ea32

Please sign in to comment.