Skip to content

Ensure renaming deletes old indexed file

Dylan Griffith requested to merge 33255-handle-renames-correctly into master

As per gitlab#33255 (closed)

This MR makes 2 changes:

  1. Minor refactoring to use put,del instead of ins,mod,del since mod wasn't doing anything different to ins and since I think the name put is a clearer indication of the fact that it will overwrite an existing file unlike ins which may make it seem like it will alway create something new
  2. 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 🤖

Merge request reports