Repository navigation
lib/db: Check if sequences change when repairing metadata - #7770
Conversation
calmh
left a comment
There was a problem hiding this comment.
I think it's overkill to drop index IDs for lower than expected remote IDs, it just means we didn't write the metadata record in time and will get duplicates of those updates (which should be fine...)? Anyway it might be nice with failure counters here as well so we can know what happens (and in which direction the problem was (lower/higher), maybe).
| if err := deleteIndexID(protocol.LocalDeviceID); err != nil { | ||
| return err | ||
| } | ||
| l.Infoln("Local sequence changed while repairing - dropping delta indexes") |
There was a problem hiding this comment.
Might want to mention the folder in these messages as I guess it might happen for several folders if it happens at all
Should indeed be fine. I think it should not happen that we do write file infos to db, but not metadata, as we write both at the same time. However who knows what the actual db layer does. |
Topic came up in #7726 (comment):
calmh:
imsodin:
I added a step at the end of the db check/repair that compares meta-sequences for all devices between before and after repair. If any of them are changed, the respective index id is reset.