-
Notifications
You must be signed in to change notification settings - Fork 403
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
Add batch clean instances maintian interface #784
Add batch clean instances maintian interface #784
Conversation
Codecov Report
@@ Coverage Diff @@
## main #784 +/- ##
==========================================
- Coverage 57.11% 57.04% -0.07%
==========================================
Files 159 161 +2
Lines 28805 28850 +45
==========================================
+ Hits 16451 16458 +7
- Misses 10155 10185 +30
- Partials 2199 2207 +8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
单元测试没有过,看看问题修复下 |
store/boltdb/maintain.go
Outdated
@@ -23,5 +23,5 @@ type maintainStore struct { | |||
|
|||
// BatchCleanDeletedInstances | |||
func (m *maintainStore) BatchCleanDeletedInstances(batchSize uint32) (uint32, error) { | |||
return 0, nil | |||
return m.handler.BatchDeleteInvalidValues(tblNameInstance, batchSize) |
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.
更合理的方式是不是应该用 m.handler 先 loadByilter 一把,然后在删除?不应该吧逻辑写在BoltDB的封装里面,不然太强要求Valid属性
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.
有道理,我改下
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.
其他我看应该没什么问题了,这个修改下就好
Please provide issue(s) of this PR:
Fixes https://github.com/polarismesh/polaris-cleanup/issues/2
为了移除 cleanup 项目对 store 的直接依赖,在 polaris-server 中新增一个批量清除软删除实例的运维接口
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.