Scille / parsec-cloud

Open source Dropbox-like file sharing with full client encryption !
https://parsec.cloud
Other
268 stars 40 forks source link

Non-existing entry ID in folder manifest is now a common thing, it should be stored in local DB #8296

Open touilleMan opened 1 week ago

touilleMan commented 1 week ago

https://github.com/Scille/parsec-cloud/blob/644618d65ef70d74f3551cafbc4c44a71baced9b/libparsec/crates/client/src/workspace/store/cache.rs#L306-L318

This comment is wrong since parent are now allowed to upload not-yet-synchronized children !

On top of that, this is also an issue since every time we stat a directory containing non-existing children, we will query the server ! We should instead mark the entry in our local database as non-existing (and wait for server event or checkpoint poll to update this)

touilleMan commented 5 days ago

After discussion with @vxgmichel, we should implemented this only in memory (typically with a HashSet in WorkspaceStore)

The alternative would be to implement this in the local storage database, but it makes implementation more complex and open the door for inconsistency bugs (i.e. the event from the server informing the entry now exists is incorrectly taken into account). So better stay KISS and wait to see if we need a more complex approach.