You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/convert
Lunny Xiao 7df09e31fa
Move issue pin to an standalone table for querying performance (#33452)
Noticed a SQL in gitea.com has a bigger load. It seems both `is_pull`
and `pin_order` are not indexed columns in the database.

```SQL
SELECT `id`, `repo_id`, `index`, `poster_id`, `original_author`, `original_author_id`, `name`, `content`, `content_version`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `pin_order`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked`, `time_estimate` FROM `issue` WHERE (repo_id =?) AND (is_pull = 0) AND (pin_order > 0) ORDER BY pin_order
```

I came across a comment
https://github.com/go-gitea/gitea/pull/24406#issuecomment-1527747296
from @delvh , which presents a more reasonable approach. Based on this,
this PR will migrate all issue and pull request pin data from the
`issue` table to the `issue_pin` table. This change benefits larger
Gitea instances by improving scalability and performance.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 week ago
..
activity.go For API attachments, use API URL (#25639) 2 years ago
attachment.go Fix attachment download bug (#27486) 1 year ago
convert.go Move commits signature and verify functions to service layers (#33605) 1 week ago
git_commit.go Move context from modules to services (#29440) 1 year ago
git_commit_test.go Adjust object format interface (#28469) 1 year ago
issue.go Move issue pin to an standalone table for querying performance (#33452) 1 week ago
issue_comment.go Make tracked time representation display as hours (#33315) 1 month ago
issue_test.go
main_test.go make writing main test easier (#27270) 1 year ago
mirror.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
notification.go Performance improvements for pull request list page (#29900) 11 months ago
package.go Clarify permission "HasAccess" behavior (#30585) 10 months ago
pull.go Move issue pin to an standalone table for querying performance (#33452) 1 week ago
pull_review.go Fix possible NPE in ToPullReviewList (#29759) 12 months ago
pull_review_test.go Enable tenv and testifylint rules (#32852) 2 months ago
pull_test.go Fix `Permission` in API returned repository struct (#25388) 2 years ago
release.go add Upload URL to release API (#26663) 2 years ago
release_test.go add Upload URL to release API (#26663) 2 years ago
repository.go Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) (#33569) 2 weeks ago
secret.go feat: implement organization secret creation API (#26566) 2 years ago
status.go refactor improve NoBetterThan (#26126) 2 years ago
user.go Make gitea webhooks openproject compatible (#28435) 9 months ago
user_test.go Add context cache as a request level cache (#22294) 2 years ago
utils.go Fix typo in gitea downloader test and add missing codebase in `ToGitServiceType` (#33146) 2 months ago
utils_test.go Fix typo in gitea downloader test and add missing codebase in `ToGitServiceType` (#33146) 2 months ago
wiki.go Fix an actions schedule bug (#28942) 1 year ago