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

feat: 执行历史归档新增模式-只备份不删除 #3037 #3043

Merged
merged 15 commits into from
Jun 7, 2024

Conversation

wangyu096
Copy link
Collaborator

@wangyu096 wangyu096 commented Jun 5, 2024

  1. 该模式当前仅设计为归档功能测试&性能测试使用,保证归档测试过程中不会删除原始数据。
  2. 不对用户开放,文档暂时无需补充相关说明
  3. 优化日志
  4. 优化归档任务的执行结果输出详情

havingValue = ArchiveModeEnum.Constants.BACKUP_THEN_DELETE)
class ArchiveModeBackupThenDeleteCondition {
@Conditional(JobExecuteBackupCondition.class)
static class BackupCondition {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里添加的BackupCondition看起来并没有被引用,不对任何Bean产生影响,需要确认下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是 spring condition AllNestedConditional 的写法,内部定义的静态类会被作为判断条件。这个是框架使用的,业务代码本身不会处理这个逻辑。具体可以在代码中,看下 spring 框架继承 AllNestedConditions 的一些写法,跟此处类似。

该条件的生效,已经在我们内部环境在不同的归档模式 backupOnly/deleteOnly/backupThenDelete 下都有验证,符合预期。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

类似这种:
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Collaborator

@jsonwan jsonwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1个问题需确认

@jsonwan jsonwan merged commit 8691140 into TencentBlueKing:master Jun 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants