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.
Edited by 🤖 GitLab Bot 🤖