[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Syncinfo core rewritten

From: Martin Letenay <mle_at_whitestein.com>
Date: 2005-07-06 11:35:04 CEST

Hello Mark,
 
I hope I'll be faster, but in case the 1.2.1 of svn will be released sooner,
I would suggest to not make a new subclipse release yet.
 
In your last observations you pointed right that the sync stuff is working
properly only after first synchronization is performed.
It was the last drop, so I decided that the whole status cache and
surrounding code has to be rewritten nearly from scratch.
 
The major problem there was, that we were using our proprietary
StatusCacheComposite in StatusCacheManager as a cache for svn status
results.
It seems there was a reason for that (according to class comment:
IResource#setSessionProperty and ISynchronizer#setSyncInfo were also
considered, but could not be used).
The reason why ISynchronizer#setSyncInfo was not used, was that it was
modyfing the workspace and there are situations when the workspace is locked
for modifications.
 
However, for deleted and added resources to work properly as phantoms, the
syncInfo stuff had to be set anyway.
Unfortunatelly, what we had so far was not a solution but rather a clumsy
set of workarounds ...
My sync patches did that stuff, but at the end we were storing more-or-less
the same sync info in two places - StatusCacheComposite and
ResourceInfo#syncInfo.
The later one being updated with a little delay in a different thread by
SVNWorkspaceSubscriber.
That was the reason why it worked properly only after first synchronize
action was done (and SVNWorkspaceSubscriber singleton was instantiated).
 
So I took a deeper look into CVS plugin again and inspired a bit there.
I've implemented a new status cache which directly stores the syncInfo via
ISynchronizer#setSyncInfo and it also takes care of situations when the
workspace
is locked (some pendingCacheWrites). Some significant amount of surrounding
code was also improved/updated/fixed.
However, from the safety reasons, I also kept the old StatusCacheComposite
there. I've abused the old StatusCacheComposite switch (save sync cache in
workspace),
so it can be turned on/off.
 
So far everything seem to work fine, but I'd rather test it for few more
days so I'm not going to post any broken code ...
If everything will work as I expect, I believe that the both correctness and
performance of the synchronization stuff will be improved noticably ...
 
Regards,
Martin
 
Received on Wed Jul 6 19:35:04 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.