This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
VCS::FileInBranch#pull can encounter strange race conditions #326
Labels
enhancement
Issues that will enhance the user experience
On Google Drive, given a folder
folder 1
with a filefile A
inside. Thenfile A
is moved out offolder 1
intofolder 2
. Andfolder 1
is deleted.Both
folder 1
andfile A
are currently loaded into memory.When
folder 1
is pulled, it is marked as deleted and so are its current children, includingfile A
. Whenfile A
is pulled afterwards, all its attributes remain unchanged except for its parent (now folder 2). So when we call#save
, it updates only parent in the database — not the other attributes. So in the databasefile A
remains incorrectly marked as deleted.We can fix this by either marking all force-update fields as dirty:
name_will_change!
andparent_id_will_change!
etc...Or we can drop those fields completely and use just current_version_id for inheriting those fields (and forcing current_version_id to update by marking it as dirty!)
The text was updated successfully, but these errors were encountered: