Eric
Posts: 17326
Joined: 10/10/2003 From: Seattle, WA Status: offline
|
I am rather delighted to say that these changes seem to be working quite well. I did find and iron out two other related issues, and I have one more preventative change to make today. Of course deadlocks and race conditions can and still will happen all the time. Where before you might see an error message and then resultant weird/glitchy and inconsistent data (e.g. a consumed bottle still appears to be in inventory), now in the error case I use exception handle (specifically the rather elegant and simply try/catch mechanism in SQL 2008) to queue up a background task to go and fix the cache in question. There is a background task that runs these fixup jobs every 10 seconds, so it is possible that you might hit a glitch (e.g. when adding or drinking a bottle) and not realize it. Maybe the drinking task will complete, but the bottle will still seem to be there. However by the time you refresh everything will already be fixed up. To put this in perspective, out of roughly 35,000 additions and removals in a given day people seemed to be hitting about a dozen glitches per day in total. The only except is on Sunday night when I run a very aggressive maintenance job that last week triggered 150 errors in one hour. Anyway, now, even in the error case, the worst thing you will see is a little brief latency/inconsistency that will fix itself up automatically.
_____________________________
Cheers! -Eric LeVine http://twitter.com/cellartracker http://facebook.com/cellartracker
|