You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/04/12 09:01:54 UTC
[GitHub] [dolphinscheduler] darkz1984 commented on issue #9089: [Bug] [API Server] after upgrade from 2.0.1 to 2.0.5 , could found task in the exists process
darkz1984 commented on issue #9089:
URL: https://github.com/apache/dolphinscheduler/issues/9089#issuecomment-1096402791
> > > hi,Can you debug code locally,Try connecting to the production metabase locally
> >
> >
> > I can connect to the database, but what's the
> > ```
> > SQL in the dolphinscheduler-dao
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ?? can you supply that to us??
>
> The SQL Mapper.xml file you need is in dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper, What I suggest is that you can combine the api-doc to find the corresponding SQL, and then query the metabase. At the same time, you can also back up the data to the local, or connect the pro database to the local Debug.
I foudn SQL and query in mapper xml files:
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.xml
queryByDefineId
```
SELECT
pd.id, pd.code, pd.name, pd.version, pd.release_state, pd.project_code, pd.user_id, pd.description,
pd.global_params, pd.flag, pd.locations, pd.warning_group_id, pd.create_time, pd.timeout,
pd.tenant_id, pd.update_time, u.user_name,p.name AS project_name
FROM
t_ds_process_definition pd,
t_ds_user u,
t_ds_project p
WHERE
pd.user_id = u.id AND pd.project_code = p.code
AND pd.id = 1
```
returns
```
-[ RECORD 1 ]----+--------------------------------------------
id | 1
code | 3855566104640
name | 简单任务测试
version | 2
release_state | 1
project_code | 3855559831744
user_id | 1
description |
global_params | []
flag | 1
locations | [{"taskCode":3855560827328,"x":68,"y":129}]
warning_group_id |
create_time | 2021-12-15 15:06:50.193
timeout | 1
tenant_id | 1
update_time | 2021-12-15 15:09:01.752
user_name | admin
project_name | 大数据测试
```
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessTaskRelationMapper.xml
queryByProcessCode
```
select
id, name, process_definition_version, project_code, process_definition_code, pre_task_code, pre_task_version,
post_task_code, post_task_version, condition_type, condition_params, create_time, update_time
from t_ds_process_task_relation
WHERE project_code = 3855559831744
and process_definition_code = 3855566104640
```
returns
```
-[ RECORD 1 ]--------------+------------------------
id | 2
name |
process_definition_version | 2
project_code | 3855559831744
process_definition_code | 3855566104640
pre_task_code | 0
pre_task_version | 0
post_task_code | 3855560827328
post_task_version | 2
condition_type | 0
condition_params | {}
create_time | 2021-12-15 15:09:01.759
update_time | 2021-12-15 15:09:01.759
```
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskDefinitionMapper.xml
queryByCode
```
select
id, code, name, version, description, project_code, user_id, task_type, task_params, flag, task_priority,
worker_group, environment_code, fail_retry_times, fail_retry_interval, timeout_flag, timeout_notify_strategy, timeout, delay_time,
resource_ids, create_time, update_time
from t_ds_task_definition
where code = 3855560827328
```
returns
```
-[ RECORD 1 ]-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 1
code | 3855560827328
name | curl获取文件
version | 2
description |
project_code | 3855559831744
user_id | 1
task_type | SHELL
task_params | {"resourceList":[],"localParams":[],"rawScript":"curl -I https://dist.apache.org/repos/dist/dev/dolphinscheduler/2.0.1/apache-dolphinscheduler-2.0.1-bin.tar.gz","dependence":{},"conditionResult":{"successNode":[],"failedNode":[]},"waitStartTimeout":{},"switchResult":{}}
flag | 1
task_priority | 2
worker_group | default
environment_code | -1
fail_retry_times | 0
fail_retry_interval | 1
timeout_flag | 0
timeout_notify_strategy | 0
timeout | 0
delay_time | 0
resource_ids |
create_time | 2021-12-15 15:06:50.193
update_time | 2021-12-15 15:09:01.734
```
the tasks query return results is what I defined before upgrade
@boy-xiaozhang
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org