Update to Umbraco 8.15


Our client has a CRM system that was built on top of Umbraco 8.
This system has grids on the front end which allows CRUD operation.
Since the system, is used by a lot of users updates to the latest Umbraco version is needed on a daily basis.
We perform update to latest 8.15 version and faced deadlocks when we try to save few records in a same time.
Save method return such message
"Transaction (Process ID 92) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
Сlient code use such method to obtain current logged user name:
MembershipUser user = Membership.GetUser();
var groups = FrontendHelper.GetRoles(user);
When we look inside Membership.GetUser method in Umbraco MembershipHelper we found that GetUser always perform last login update, if guieried user is online.
if (userIsOnline)
{
// when upgrading from 7.2 to 7.3 trying to save will throw
if (UmbracoVersion.Current >= new Version(7, 3, 0, 0))
{
var now = DateTime.Now;
// update the database data directly instead of a full member save which requires DB locks
MemberService.SetLastLogin(username, now);
member.LastLoginDate = now;
member.UpdateDate = now;
}
}
I didn't analyze code changes that cause deadlocks on 8.15 but not on 8.6 but we just removed expensive Db saves when we need to obtain a user name, taking it from Identity:
username = System.Web.HttpContext.Current.User.Identity.Name;
So be careful when you use some common methods too often.
And this is a story about QA importance in every minor update.
So if you need some Umbraco support or updates just send us a message.