I have MVC application hosted as Azure web role and I also have Worker role which checks some data and update records in database. Worker role checks data on every 15 minutes.
Yesterday, I went into big trouble because a lot of changes made via MVC application is just reverted.
I will try to give an example:
User made changes on one entity yesterday (this is tracked by event log)
In meantime, worker role updated that entity
Today, user updated entity multiple time
At the end, entity has data from yesterday, not from today
MVC application uses simple SaveChanges function while worker role uses BeginTransaction with SaveChanges.
I suspect on locking and isolation level, but it is strange that lock is almost 24h long.
I hope that someone will understand this and help me.
Thanks