apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.88k stars 4.63k forks source link

[Improvement-16443][Workflow Timing] Improvement add operator #16450

Closed sdhzwc closed 2 months ago

sdhzwc commented 3 months ago

close #16443 The effect is as follows: recording

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

sdhzwc commented 3 months ago

It's better to set modify_user as create_user when upgrade.

What needs to be adjusted? Could you specify?

ruanwenjun commented 3 months ago

It's better to set modify_user as create_user when upgrade.

What needs to be adjusted? Could you specify?

It's not a good idea to make modify_user_id DEFAULT NULL, this will make confusion, why the create user is not null, but the modify_user_id can be null, no one can explain this. If the modify_user_id is null is this a bug?

To avoid this kind problem, you need to inject a value for the new column, obviously you should use create_user to inject.

ruanwenjun commented 3 months ago

Additional, it's better to create a DSIP to unify the logic, we should add modify user to all table which have create user. Otherwise, this look like strange.

sdhzwc commented 3 months ago

It's better to set modify_user as create_user when upgrade.

What needs to be adjusted? Could you specify?

It's not a good idea to make modify_user_id DEFAULT NULL, this will make confusion, why the create user is not null, but the modify_user_id can be null, no one can explain this. If the modify_user_id is null is this a bug?

To avoid this kind problem, you need to inject a value for the new column, obviously you should use create_user to inject.

The reason is very simple. When the timer is created, it is definite. The creator is the logged-in person. At this time, there is no modification operation, so there is no need to specify the updater. I think it makes sense. If the updater is added, I think there will be ambiguity because there is no update operation yet.

ruanwenjun commented 3 months ago

It's better to set modify_user as create_user when upgrade.

What needs to be adjusted? Could you specify?

It's not a good idea to make modify_user_id DEFAULT NULL, this will make confusion, why the create user is not null, but the modify_user_id can be null, no one can explain this. If the modify_user_id is null is this a bug? To avoid this kind problem, you need to inject a value for the new column, obviously you should use create_user to inject.

The reason is very simple. When the timer is created, it is definite. The creator is the logged-in person. At this time, there is no modification operation, so there is no need to specify the updater. I think it makes sense. If the updater is added, I think there will be ambiguity because there is no update operation yet.

This is not a common practice, please reference the last_modify_user/last_modify_time in aws/linux.

sdhzwc commented 3 months ago

It's better to set modify_user as create_user when upgrade.

What needs to be adjusted? Could you specify?

It's not a good idea to make modify_user_id DEFAULT NULL, this will make confusion, why the create user is not null, but the modify_user_id can be null, no one can explain this. If the modify_user_id is null is this a bug? To avoid this kind problem, you need to inject a value for the new column, obviously you should use create_user to inject.

The reason is very simple. When the timer is created, it is definite. The creator is the logged-in person. At this time, there is no modification operation, so there is no need to specify the updater. I think it makes sense. If the updater is added, I think there will be ambiguity because there is no update operation yet.

This is not a common practice, please reference the last_modify_user/last_modify_time in aws/linux.

It has been changed. The value has been added when inserting.

sonarcloud[bot] commented 2 months ago

Please retry analysis of this Pull-Request directly on SonarCloud