Skip to content

Commit 912b718

Browse files
merge
2 parents d4f57fc + 8e30a6a commit 912b718

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.apache.doris.cloud.master.CloudReportHandler;
3434
import org.apache.doris.common.Config;
3535
import org.apache.doris.common.MetaNotFoundException;
36+
import org.apache.doris.common.Status;
3637
import org.apache.doris.load.DeleteJob;
3738
import org.apache.doris.load.loadv2.IngestionLoadJob;
3839
import org.apache.doris.system.Backend;
@@ -352,15 +353,17 @@ private void finishRealtimePush(AgentTask task, TFinishTaskRequest request) thro
352353
// we don't need to retry if the returned status code is DELETE_INVALID_CONDITION
353354
// or DELETE_INVALID_PARAMETERS
354355
// note that they will be converted to TStatusCode.INVALID_ARGUMENT when being sent from be to fe
355-
if (request.getTaskStatus().getStatusCode() == TStatusCode.INVALID_ARGUMENT) {
356-
pushTask.countDownToZero(request.getTaskStatus().getStatusCode(),
357-
task.getBackendId() + ": " + request.getTaskStatus().getErrorMsgs().toString());
356+
TStatus taskStatus = request.getTaskStatus();
357+
String msg = task.getBackendId() + ": " + taskStatus.getErrorMsgs().toString();
358+
if (taskStatus.getStatusCode() == TStatusCode.INVALID_ARGUMENT) {
359+
pushTask.countDownToZero(taskStatus.getStatusCode(), msg);
358360
} else {
359-
pushTask.countDownLatch(backendId, pushTabletId);
361+
pushTask.countDownLatchWithStatus(backendId, pushTabletId,
362+
new Status(taskStatus.getStatusCode(), msg));
360363
}
361364
AgentTaskQueue.removeTask(backendId, TTaskType.REALTIME_PUSH, signature);
362365
LOG.warn("finish push replica, signature={}, error: {}",
363-
signature, request.getTaskStatus().getErrorMsgs().toString());
366+
signature, taskStatus.getErrorMsgs().toString());
364367
}
365368
return;
366369
}
@@ -471,7 +474,7 @@ private void finishRealtimePush(AgentTask task, TFinishTaskRequest request) thro
471474
AgentTaskQueue.removeTask(backendId, TTaskType.REALTIME_PUSH, signature);
472475
LOG.warn("finish push replica error", e);
473476
if (pushTask.getPushType() == TPushType.DELETE) {
474-
pushTask.countDownLatch(backendId, pushTabletId);
477+
pushTask.countDownLatchWithStatus(backendId, pushTabletId, Status.CANCELLED);
475478
}
476479
} finally {
477480
olapTable.writeUnlock();

fe/fe-core/src/main/java/org/apache/doris/task/PushTask.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,18 @@ public void countDownLatch(long backendId, long tabletId) {
212212
}
213213
}
214214

215+
public void countDownLatchWithStatus(long backendId, long tabletId, Status st) {
216+
if (this.latch == null) {
217+
return;
218+
}
219+
if (latch.markedCountDownWithStatus(backendId, tabletId, st)) {
220+
if (LOG.isDebugEnabled()) {
221+
LOG.debug("pushTask current latch count with status: {}. backend: {}, tablet:{}, st::{}",
222+
latch.getCount(), backendId, tabletId, st);
223+
}
224+
}
225+
}
226+
215227
// call this always means one of tasks is failed. count down to zero to finish entire task
216228
public void countDownToZero(TStatusCode code, String errMsg) {
217229
if (this.latch != null) {

regression-test/suites/fault_injection_p0/test_delete_from_timeout.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ suite("test_delete_from_timeout","nonConcurrent") {
5151

5252
test {
5353
sql """delete from ${tableName} where col1 = "false" and col2 = "-9999782574499444.2" and col3 = "-25"; """
54-
exception "invalid parameters for store_cond. condition_size=1"
54+
exception "too many versions"
5555
}
5656

5757
GetDebugPoint().clearDebugPointsForAllBEs()
@@ -73,4 +73,4 @@ suite("test_delete_from_timeout","nonConcurrent") {
7373
} finally {
7474
GetDebugPoint().clearDebugPointsForAllBEs()
7575
}
76-
}
76+
}

0 commit comments

Comments
 (0)