dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [Task] HiveCli SQL execution failed, but the task node shows success.

Open adonis-lau opened this issue 1 year ago • 7 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

In the shell node, multiple SQL files are called using hive -f, and each file contains multiple SQL statements. When one of the SQL statements fails, the subsequent SQL statements continue to execute, and the status of the shell node is marked as successful. 任务日志截图 任务状态截图

What you expected to happen

In the shell node, after invoking SQL via hive -f, if there are failures in the SQL execution, the subsequent SQLs should not continue to execute, and the status of the shell node should be marked as failed.

How to reproduce

If there are 5 SQL commands in a Hive SQL file and the second command fails, the third, fourth, and fifth commands will still be executed. If these commands are executed successfully, the node will be marked as having executed successfully.

Anything else

No response

Version

3.2.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

adonis-lau avatar Apr 26 '24 02:04 adonis-lau

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

In the shell node, multiple SQL files are called using hive -f, and each file contains multiple SQL statements. When one of the SQL statements fails, the subsequent SQL statements continue to execute, and the status of the shell node is marked as successful. 任务日志截图 任务状态截图

What you expected to happen

In the shell node, after invoking SQL via hive -f, if there are failures in the SQL execution, the subsequent SQLs should not continue to execute, and the status of the shell node should be marked as failed.

How to reproduce

If there are 5 SQL commands in a Hive SQL file and the second command fails, the third, fourth, and fifth commands will still be executed. If these commands are executed successfully, the node will be marked as having executed successfully.

Anything else

No response

Version

3.2.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

github-actions[bot] avatar Apr 26 '24 02:04 github-actions[bot]

Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.

ruanwenjun avatar Apr 26 '24 05:04 ruanwenjun

Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.

The HiveCli SQL run base on shell, When build the shell ,use set -e ,could fix this ?

wangxj3 avatar Apr 29 '24 00:04 wangxj3

Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.

The HiveCli SQL run base on shell, When build the shell ,use set -e ,could fix this ?

I have not test this, but it might not fix this due to the multiple SQLS are been executed by one command, rather than multiple commands.

ruanwenjun avatar Apr 29 '24 01:04 ruanwenjun

Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.

The HiveCli SQL run base on shell, When build the shell ,use set -e ,could fix this ?

I have not test this, but it might not fix this due to the multiple SQLS are been executed by one command, rather than multiple commands.

Oh,This doesn't look like a very good solution for one command .I will check it .

wangxj3 avatar Apr 29 '24 01:04 wangxj3

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar May 30 '24 00:05 github-actions[bot]

Yes, this should be a bug happens when the script contains multiple sqls, we might need to split the sql, and check each sql status after finished.

use multi shell command also need check each command status,we produced bugs in prod env

chengcxy avatar Jun 02 '24 18:06 chengcxy

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Jul 04 '24 00:07 github-actions[bot]

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

github-actions[bot] avatar Jul 11 '24 00:07 github-actions[bot]