summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-10-17 00:55:33 -0700
committerStan Hu <stanhu@gmail.com>2015-10-17 00:58:14 -0700
commitca3ce5c26c60de421e010491cf9166f2090c8cc8 (patch)
treec16a7a99b45bf48c13daa3804e92e2075c9a5149 /lib/api/api.rb
parentc856a7a5934fba13598be09507c2090888f57a39 (diff)
downloadgitlab-ce-ca3ce5c26c60de421e010491cf9166f2090c8cc8.tar.gz
Fix nonatomic database update potentially causing project star counts to go negative
The counter_cache decrement function is called when a project star is deleted, but there was no guarantee multiple workers would not attempt to delete the same item simultaneously. Use an atomic update to prevent the count from going negative. Closes #3067
Diffstat (limited to 'lib/api/api.rb')
0 files changed, 0 insertions, 0 deletions