You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I realised a perfomance issue, we are using second level cache so we need a session and transaction by default. After data read commit occours thats fine but it tries to do something with
UpdateTimestampsCache
[MethodImpl(MethodImplOptions.Synchronized)]publicvirtualvoidInvalidate(IReadOnlyCollection<string>spaces){//TODO: to handle concurrent writes correctly, the client should pass in a Locklongts=_updateTimestamps.NextTimestamp();//TODO: if lock.getTimestamp().equals(ts)if(log.IsDebugEnabled())log.Debug("Invalidating spaces [{0}]",StringHelper.CollectionToString(spaces));SetSpacesTimestamp(spaces,ts);}
As you can see above
[MethodImpl(MethodImplOptions.Synchronized)] is a problem if spaces is empty. There are other sync. methods some of them check spaces before calling sync method some not.
I think all of them need to check spaces before calling sync method for concurrency performance issue?