Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Vector time does not get reset correctly when deleting a file #223
Saros does not seem to reset the vector time correctly when a file is deleted.
Steps to Reproduce
Interesting comment found here:
So yes you are right, it is only called during a file recovery activity but deletes are ignored.
So the question is:
Should this explicitly called by a component that detects the file deletion, or should the ActivityHandler or the ConcurrentDocumentClient (invoked by the ActivityHandler) handle this when they see a FileSystemModification activity ?
I guess file moves are also not handled correctly.
Yes, moves are not handled correctly as well. I did not mention it because, even though I also noticed the problem for moved files, I did not explicitly test for it.
I am torn on where to put the reset.
Doing it in the component that detects the deletion/move would be preferable from a performance standpoint as it would not add additional checks for every dispatched/received activity. This overhead is especially annoying since file deletions/moves are most likely only a small minority of send activities.
But this would also means that the reset would have to be done in the IDE specific part of the implementation.
A solution in the core (in the ActivityHandler or the ConcurrentDocumentClient) would be better from this point of view, as it would avoid a potential source of bugs for future implementations/changes to the IDE specific logic.
I think I would still prefer doing it in the detection logic and adding it to some kind of core javadoc to avoid/minimize errors of omission for future changes/implementations.
@srossbach Is just calling
I am only asking as I am still having VectorTime problems even though I am resetting the document clients. I will also do some more testing, but since you seem to have a better understanding of the consistency stuff I also wanted to ask you.
referenced this issue
Sep 30, 2018
The server part runs in a different thread than the client part, and IIRC Jupiter documents are "created" on the fly -> if you reset a file and receive a change again the document is present again.
The Jupiter stuff is not really my part of the whole application, it is a big bag box for me. I do not even know how the algorithm work in detail.