Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](mtmv)add log for resolve pending task #28999

Merged
merged 2 commits into from
Dec 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add lock for resolve pending task
  • Loading branch information
zddr committed Dec 25, 2023
commit d30da0fb031a771284d13b909a7cd1988e737081
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public MTMVTask(long dbId, long mtmvId, MTMVTaskContext taskContext) {

@Override
public void run() throws JobException {
LOG.info("mtmv task run, taskId: {}", super.getTaskId());
try {
ConnectContext ctx = MTMVPlanUtil.createMTMVContext(mtmv);
// Every time a task is run, the relation is regenerated because baseTables and baseViews may change,
Expand Down Expand Up @@ -185,18 +186,21 @@ private void exec(ConnectContext ctx, Set<Long> refreshPartitionIds, Map<OlapTab

@Override
public synchronized void onFail() throws JobException {
LOG.info("mtmv task onFail, taskId: {}", super.getTaskId());
super.onFail();
after();
}

@Override
public synchronized void onSuccess() throws JobException {
LOG.info("mtmv task onSuccess, taskId: {}", super.getTaskId());
super.onSuccess();
after();
}

@Override
public synchronized void cancel() throws JobException {
LOG.info("mtmv task cancel, taskId: {}", super.getTaskId());
super.cancel();
if (executor != null) {
executor.cancel();
Expand All @@ -206,6 +210,7 @@ public synchronized void cancel() throws JobException {

@Override
public void before() throws JobException {
LOG.info("mtmv task before, taskId: {}", super.getTaskId());
super.before();
try {
Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbId);
Expand All @@ -222,7 +227,7 @@ public void before() throws JobException {

@Override
public void runTask() throws JobException {
LOG.info("mtmv task start run, taskId: {}", super.getTaskId());
LOG.info("mtmv task runTask, taskId: {}", super.getTaskId());
MTMVJob job = (MTMVJob) getJobOrJobException();
try {
LOG.info("mtmv task get writeLock start, taskId: {}", super.getTaskId());
Expand Down
Loading