Restrict last_activity_at updates to one per hour
1 unresolved thread
1 unresolved thread
What does this MR do?
This MR reduces the number of updates to projects.last_activity_at
to once per hour.
Why was this MR needed?
https://gitlab.com/gitlab-org/gitlab-ce/issues/22213
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Merge request reports
Activity
- Resolved by Yorick Peterse
- Resolved by Yorick Peterse
Added 75 commits:
-
d37edb59...c20e4267 - 74 commits from branch
master
- 7187efe6 - Restrict last_activity_at updates to one per hour
-
d37edb59...c20e4267 - 74 commits from branch
@rymai Done.
Added 1 commit:
- 028c086f - Restrict last_activity_at updates to one per hour
@yorickpeterse Awesome, thanks!
Enabled an automatic merge when the build for 028c086f succeeds
Mentioned in commit 9335953d
I think this is causing a build failure since
last_activity_at
can only be updated once an hour: https://gitlab.com/gitlab-org/gitlab-ce/builds/4218398324 326 end 325 327 326 328 def reset_project_activity 327 if project && Gitlab::ExclusiveLease.new("project:update_last_activity_at:#{project.id}", timeout: 60).try_obtain 328 project.update_column(:last_activity_at, self.created_at) 329 end 329 return unless project 330 331 # Don't even bother obtaining a lock if the last update happened less than 332 # 60 minutes ago. 333 return if project.last_activity_at > RESET_PROJECT_ACTIVITY_INTERVAL.ago I think this will always be true. I think https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6424/diffs#ed3aaab1510f43b032ce345909a887e5b167e196_336_343 solves this.Edited by Stan Hu
Mentioned in merge request gitlab-com/www-gitlab-com!3202 (merged)
Mentioned in commit 9c4cb45b
Please register or sign in to reply