Ensure delete user deletes all comments#21067
Merged
Merged
Conversation
jolheiser
approved these changes
Sep 5, 2022
zeripath
reviewed
Sep 5, 2022
Contributor
|
The DeleteComment code is really quite inefficient, especially the neuter cross-references code. This really should all be done within the DB. There is no need to get this stuff out of the DB. |
zeripath
approved these changes
Sep 5, 2022
Contributor
zeripath
left a comment
There was a problem hiding this comment.
Approved as this fixes a serious bug - but see my comment about the serious inefficiencies in this code.
Codecov Report
@@ Coverage Diff @@
## main #21067 +/- ##
==========================================
- Coverage 47.13% 47.03% -0.10%
==========================================
Files 1008 1007 -1
Lines 137718 137581 -137
==========================================
- Hits 64911 64716 -195
- Misses 64870 64935 +65
+ Partials 7937 7930 -7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
lunny
added a commit
that referenced
this pull request
Sep 5, 2022
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Sep 6, 2022
* upstream/main: Fix sub folder in repository missing add file dropdown (go-gitea#21069) [skip ci] Updated translations via Crowdin Add missing volume to test-e2e (go-gitea#21079) Fix delete user missed some comments (go-gitea#21067) Remove insecure flag from curl (go-gitea#21074) Update curl usage in API docs (go-gitea#21071) Move go-licenses to generate and separate generate into a frontend and backend component (go-gitea#21061)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a mistake in the batched delete comments part of DeleteUser which causes some comments to not be deleted
The code incorrectly updates the
startof the limit clause resulting in most comments not being deleted.should be: