Skip to content

Commit b1745f6

Browse files
committed
deal npe
1 parent 706e46b commit b1745f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/odc-service/src/main/java/com/oceanbase/odc/service/flow/task/LogicalDatabaseChangeFlowableTask.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ protected Void start(Long taskId, TaskService taskService, DelegateExecution exe
8686
}
8787
}
8888

89-
public JobContext buildJobContext(LogicalDatabaseChangePublishReq taskResult, Long timeoutMillis) {
89+
public JobContext buildJobContext(LogicalDatabaseChangePublishReq req, Long timeoutMillis) {
9090
Map<String, String> jobData = new HashMap<>();
9191
jobData.put(JobParametersKeyConstants.TASK_PARAMETER_JSON_KEY,
92-
JobUtils.toJson(taskResult));
92+
JobUtils.toJson(req));
9393
if (timeoutMillis != null) {
9494
jobData.put(JobParametersKeyConstants.TASK_EXECUTION_END_TIME_MILLIS,
9595
String.valueOf(System.currentTimeMillis() + timeoutMillis));
@@ -154,6 +154,7 @@ protected void onProgressUpdate(Long taskId, TaskService taskService) {
154154
}
155155
double previousProgress = lastProgress.get();
156156
double currentProgress = logicalDatabaseChangeTask.getProgress();
157+
taskResult = new LogicalDatabaseChangeTaskResult();
157158
taskResult.setSqlExecutionResultMap(logicalDatabaseChangeTask.getTaskResult());
158159
String currentResult = JsonUtils.toJson(taskResult);
159160

0 commit comments

Comments
 (0)