-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
refactor: optimize comment and reply deletion #5777
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.
/lgtm
/hold 我再添加一个 deletionTimestamp 为 null 的条件比较稳妥 |
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.
如果在删除期间,产生了新的数据似乎也会被删除掉的现象也是符合预期的么?
对于评论和回复来说是这样的,因为文章都被删除了留着文章的评论和回复也没用,因此会删除完全即使是新添加的数据 |
application/src/main/java/run/halo/app/content/comment/CommentServiceImpl.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5777 +/- ##
============================================
- Coverage 56.91% 56.61% -0.31%
- Complexity 3319 3371 +52
============================================
Files 587 604 +17
Lines 18968 19800 +832
Branches 1401 1364 -37
============================================
+ Hits 10795 11209 +414
- Misses 7594 8024 +430
+ Partials 579 567 -12 ☔ View full report in Codecov by Sentry. |
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.
/lgtm
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
What type of PR is this?
/kind improvement
/area core
/milestone 2.15.x
What this PR does / why we need it:
优化评论和回复删除,只有删除第一页后才会再次查询避免数据堆积
Does this PR introduce a user-facing change?