gitlab-org--gitlab-foss/app/models
Dmitriy Zaporozhets 64c2bccdd9 Merge branch 'fix-issue-3067' into 'master'
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.

Note: I was only able to duplicate the issue on GitLab.com, but I haven't been able to replicate it anywhere else. Presumably this bug happens when the `WHERE` clause takes some time to search for the right entry and multiple requests get sent simultaneously. Need to verify whether this fix truly solves the issue.

Closes #3067

See merge request !1628
2015-10-17 18:00:02 +00:00
..
ci Implement when syntax in .gitlab-ci.yml 2015-10-15 23:49:39 +02:00
concerns Merge branch 'master' into rs-redactor-filter 2015-10-16 11:26:48 +02:00
hooks
members
network
project_services Improve invalidation of stored service password if the endpoint URL is changed 2015-10-15 12:07:59 +02:00
.gitkeep
ability.rb Added builds view 2015-10-14 17:28:38 +02:00
abuse_report.rb
application_setting.rb
audit_event.rb
broadcast_message.rb
commit.rb Merge branch 'master' into rs-redactor-filter 2015-10-15 11:26:58 +02:00
commit_range.rb
commit_status.rb Implement when syntax in .gitlab-ci.yml 2015-10-15 23:49:39 +02:00
deploy_key.rb
deploy_keys_project.rb
diff_line.rb
email.rb
event.rb
external_issue.rb
forked_project_link.rb
generic_commit_status.rb Implement Commit Status API 2015-10-12 11:53:49 +02:00
group.rb Eager load various issue/note associations 2015-10-15 12:05:01 +02:00
group_label.rb Allow dashboard and group issues/MRs to be filtered by label 2015-10-14 12:33:39 +02:00
group_milestone.rb Allow dashboard and group issues/MRs to be filtered by label 2015-10-14 12:33:39 +02:00
identity.rb
issue.rb
key.rb
label.rb Restore placeholders in issue filters from "Any" to "Milestone" and "Label" 2015-10-08 23:53:32 -07:00
label_link.rb
member.rb
merge_request.rb merge_request: add work_in_progress to MR hooks 2015-10-08 16:37:04 -04:00
merge_request_diff.rb Add a system note and update relevant merge requests when a branch is deleted or re-added 2015-10-15 23:54:13 -07:00
milestone.rb Restore placeholders in issue filters from "Any" to "Milestone" and "Label" 2015-10-08 23:53:32 -07:00
namespace.rb Fix: Images cannot show when projects' path was changed 2015-10-14 18:50:35 +03:00
note.rb Merge branch 'master' into rs-redactor-filter 2015-10-16 11:26:48 +02:00
notification.rb
personal_snippet.rb
project.rb Merge branch 'builds-view' into 'master' 2015-10-15 11:35:57 +00:00
project_import_data.rb
project_snippet.rb
project_team.rb Improve ProjectTeam#max_member_access performance 2015-10-15 12:05:01 +02:00
project_wiki.rb
protected_branch.rb
repository.rb Add system notes for restored branches 2015-10-15 23:54:13 -07:00
security_event.rb
sent_notification.rb
service.rb Improve invalidation of stored service password if the endpoint URL is changed 2015-10-15 12:07:59 +02:00
snippet.rb
subscription.rb
tree.rb
user.rb Fix nonatomic database update potentially causing project star counts to go negative 2015-10-17 00:58:14 -07:00
users_star_project.rb
wiki_page.rb