Ensure renaming deletes old indexed file
As per gitlab#33255 (closed)
This MR makes 2 changes:
- Minor refactoring to use
put,del
instead ofins,mod,del
sincemod
wasn't doing anything different toins
and since I think the nameput
is a clearer indication of the fact that it will overwrite an existing file unlikeins
which may make it seem like it will alway create something new - Fixes the bug where renames weren't correctly deleting the old file
It's also worth noting that this will ensure new renames are handled properly there will still be orphaned files from previous renames that won't get cleaned up by this. We may wish to handle that properly too but probably in a separate MR or migration as it's quite tricky. If anyone was really concerned they can always reindex from scratch too.
Merge request reports
Activity
@nick.thomas would you mind taking a look. I made a minor refactoring but happy to revert that part of it if you preferred the old convention.
Also I updated
go.sum
but I'm not sure if that's the right thing to do or not.assigned to @nick.thomas
- Resolved by Nick Thomas
- Resolved by Dylan Griffith
- Resolved by Dylan Griffith
Thanks for looking at this one @DylanGriffith , just a couple of comments above.
I wonder if this has been a bug since we switched to the Gitaly integration, or even before then
The
go.sum
change is fine, as far as it goes. We can avoid the accumulation of lines over time by adding atools.go
, similar to what we're doing in workhorse and pages: https://gitlab.com/gitlab-org/gitlab-workhorse/blob/master/tools.go - it doesn't need to be part of this MR though.Edited by Nick Thomas
assigned to @DylanGriffith and unassigned @nick.thomas
mentioned in merge request !39 (merged)
added 2 commits
@nick.thomas would you mind giving this another look.
assigned to @nick.thomas
changed milestone to %12.4
- Resolved by Nick Thomas
mentioned in commit 9848f5a3
mentioned in issue #39 (closed)
added devopsdata stores label and removed devopssystems label