Originally posted by RandomBeast
do the database queries use transactions and row locking?
could it be like this:
boost page reads SP value: 5
spend page reads SP value: 5
boost page adds 5 to stored value and writes value: 10
spend page subtracts 5 from stored value and writes new value: 0
So if running simultaneously (probably with some lag involved) it could process a boost and still show up without the 5 points?
Yes, InnoDB.
That scenario could be what happened. The function for "level up" does a query that says "update ... set sp = sp + 5" but the spend page might set it explicitly instead...race condition (I don't remember haha). If so I just need to make it tell mysql to do the math instead of setting the number explicitly.
And...I just looked it up and that is the case and most probable scenario.
tahl, I'll reset your guy's boost number to 2 so you can re-boost him one more time (and do a FP refund). He wouldn't have gotten his level up fractional points either. I'll see what I can do to fix the problem, but in the future, don't do that!
do the database queries use transactions and row locking?
could it be like this:
boost page reads SP value: 5
spend page reads SP value: 5
boost page adds 5 to stored value and writes value: 10
spend page subtracts 5 from stored value and writes new value: 0
So if running simultaneously (probably with some lag involved) it could process a boost and still show up without the 5 points?
Yes, InnoDB.
That scenario could be what happened. The function for "level up" does a query that says "update ... set sp = sp + 5" but the spend page might set it explicitly instead...race condition (I don't remember haha). If so I just need to make it tell mysql to do the math instead of setting the number explicitly.
And...I just looked it up and that is the case and most probable scenario.
tahl, I'll reset your guy's boost number to 2 so you can re-boost him one more time (and do a FP refund). He wouldn't have gotten his level up fractional points either. I'll see what I can do to fix the problem, but in the future, don't do that!






























