[jcifs] Re: jcifs.smb.Dfs bugs
Usenet.r96 at gishpuppy.com
Thu Apr 24 14:40:32 GMT 2008
>>> Btw, accesses to "referrals" cache are unsynchronized, I think this
>>> needs to be changed as well as there is only one static Dfs instance.
>> True. Some maps should be synchronized. I'll create an update for this.
> Make the jcifs.smb.client.Dfs.resolve() method synchronized:
> public synchronized DfsReferral resolve(String domain, ...
> and try your tests again. I wouldn't be surprised if that fixed all of
> your DFS related issues.
> Note that you can also temporarily reduce jcifs.smb.client.dfs.ttl to
> say 10 seconds to really stess the DFS cache code.
I did that. Actually a bit different, as the referrals cache is used in
#insert as well. So to be on the safe side, I just added a new lock
object "referralsLock" to the class and synchronized the blocks using
the referrals cache in #resolve and #insert. dfs.ttl is set to 15s as well.
It seems to work fine now.
More information about the jcifs