Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r--lib/gitlab/usage_data.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 2caaf126512..5fa843f3f1f 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -723,7 +723,9 @@ module Gitlab
else
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable UsageData/LargeTable
- estimate_batch_distinct_count(::Event.where(time_period), :author_id)
+ start = ::Event.where(time_period).select(:id).order(created_at: :asc).first&.id
+ finish = ::Event.where(time_period).select(:id).order(created_at: :asc).first&.id
+ estimate_batch_distinct_count(::Event.where(time_period), :author_id, start: start, finish: finish)
# rubocop: enable UsageData/LargeTable
# rubocop: enable CodeReuse/ActiveRecord
end