-
Notifications
You must be signed in to change notification settings - Fork 28.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加商品属性存在原子型问题 #491
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
背景:添加产品属性对于属性分类表有两次数据库操作,第一次获取对应的分类记录,第二次把属性数量累加了1更新数据库。
问题:如果要是存在并发的情况,比如两个线程同时读取完了分类记录,获得的属性数量是一致的,那么两个线程同时加1,然后分别更新,就会导致实际只加了1而不是2。
The text was updated successfully, but these errors were encountered: