How does Eclipse\RTC Mark files as changed
Problem:
The same workspace is being loaded on two computers. (yes I know, not optimal)
Changes are made on computer 1 and checked in.
Then on computer 2 I see the message:
"Some of your projects are out of sync. We recommend you reload these project...."
When the project is reloaded, normally it will just reload the changed file from computer 1 and any files that were changed on computer 2 but all the other files will be left untouched.
The problem I am seeing is that all the files and folders on computer 2 are being reloaded even though none of them have been changed locally.
I verified that all files are being updated because all the time stamps change and the operation takes 2 minutes instead of just a few seconds.
It isn't always 100% consistent, it might be different on different workspaces and usually only happens in one direction (computer 1 to computer 2) but I have seen it happen in reverse on occasion as well.
Any thoughts on what might trigger this?
Accepted answer
Effectively, a sandbox keeps a modification counter for each workspace loaded into that sandbox. When you perform a modification operation on the workspace (e.g., checkin, accept) in the context of that sandbox, it checks whether that the modification counter for that workspace in the sandbox matches the current modification counter of that workspace. If it doesn't match, then some other process has modified the configuration of the workspace out from underneath this sandbox in some unknown way, and an "out of sync" message is generated. The "resync" operation will scan every loaded file in the sandbox to see if it should be updated (it cannot do a delta update because the current relationship between the loaded files and the workspace is no longer known).
Comments
One other answer
I think Load loads everything.. while Accept only applies the changes.
RTC sees changes to files, not the file itself. so, when u do a save, the change set is calculated from the differences. Timestamps don't mean anything.
RTC sees changes to files, not the file itself. so, when u do a save, the change set is calculated from the differences. Timestamps don't mean anything.