From 15614a83682f972bbe900cae935fdc47c4e80e2e Mon Sep 17 00:00:00 2001 From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Sat, 15 Feb 2020 07:51:25 -0300 Subject: Divide GetIssueStats query in smaller chunks (#10176) * Divide GetIssueStats query in smaller chunks * Skip chunking if count is low enough * Fix lint * Define maxQueryParameters * Remove absMaxQueryParameters because of lint * Restart CI * Restart CI Co-authored-by: Lunny Xiao Co-authored-by: zeripath Co-authored-by: Lauris BH --- models/models.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'models/models.go') diff --git a/models/models.go b/models/models.go index b84a179e37..088445590f 100644 --- a/models/models.go +++ b/models/models.go @@ -48,6 +48,12 @@ type Engine interface { SumInt(bean interface{}, columnName string) (res int64, err error) } +const ( + // When queries are broken down in parts because of the number + // of parameters, attempt to break by this amount + maxQueryParameters = 300 +) + var ( x *xorm.Engine tables []interface{} -- cgit v1.2.3