-
Notifications
You must be signed in to change notification settings - Fork 1k
[Bug] ApplicationBackUpCleanTask Runtime Error #4253
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
base: dev
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gianzie I left a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@
backUpService.lambdaQuery() | ||
.select(FlinkApplicationBackup::getAppId) | ||
.groupBy(FlinkApplicationBackup::getAppId) | ||
.having("count(*) > " + maxBackupNum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.having("count(*) > " + maxBackupNum) | |
.having("COUNT(*) > {0}", maxBackupNum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gianzie Use params to pass value will be better.
What changes were proposed in this pull request
In the current code, the table "t_flink_app_backup" will be cleaned at 01:00 everyday, and the sql is "SELECT id,app_id,sql_id,config_id,path,description,version,create_time FROM t_flink_app_backup GROUP BY app_id HAVING count(*) > 5"
But mysql8.0 sql_mode is "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION", so this clean task is always error.
So I think we can just get "FlinkApplicationBackup::getAppId" column.
Brief change log
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts