Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql #5136

Merged
merged 9 commits into from
Oct 30, 2018

Conversation

lunny
Copy link
Member

@lunny lunny commented Oct 22, 2018

This commit removed join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql database. Also, it maybe results in some performance reduce since it used some sub query instead join query.
This will partilly fix #4282.

@lunny lunny added the type/bug label Oct 22, 2018
@lunny lunny added this to the 1.7.0 milestone Oct 22, 2018
@lafriks
Copy link
Member

lafriks commented Oct 22, 2018

Tests seem to fail

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 22, 2018
@lunny lunny force-pushed the lunny/fix_mssql_repo_search branch from bd17058 to 0d2dd17 Compare October 23, 2018 14:52
@lunny
Copy link
Member Author

lunny commented Oct 23, 2018

@lafriks The previous test assertion is wrong. See https://github.com/go-gitea/gitea/blob/master/models/fixtures/repo_topic.yml, there is three records and 2 repos which topic name is graphql (id:4) and golang(id:1). So correct results should repo [1, 33], count 2, not [1, 33, 33] count 3. @appleboy

@lunny lunny mentioned this pull request Oct 24, 2018
6 tasks
@codecov-io
Copy link

codecov-io commented Oct 24, 2018

Codecov Report

Merging #5136 into master will decrease coverage by <.01%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5136      +/-   ##
==========================================
- Coverage   37.47%   37.47%   -0.01%     
==========================================
  Files         310      310              
  Lines       45935    45921      -14     
==========================================
- Hits        17216    17209       -7     
+ Misses      26242    26237       -5     
+ Partials     2477     2475       -2
Impacted Files Coverage Δ
models/repo_list.go 64.55% <93.75%> (+1.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5daa26...49217f5. Read the comment docs.

@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 30, 2018
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 30, 2018
@techknowlogick techknowlogick merged commit 1037065 into go-gitea:master Oct 30, 2018
@lafriks
Copy link
Member

lafriks commented Oct 30, 2018

@lunny please send backport to release/1.6

@lunny lunny deleted the lunny/fix_mssql_repo_search branch October 31, 2018 02:04
lunny added a commit to lunny/gitea that referenced this pull request Oct 31, 2018
…earch, so that fix extra columns problem on mssql (go-gitea#5136)

* This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql

* fix tests
@lunny lunny added the backport/done All backports for this PR have been created label Oct 31, 2018
techknowlogick pushed a commit that referenced this pull request Nov 1, 2018
…earch, so that fix extra columns problem on mssql (#5136) (#5229)

* This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql

* fix tests
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants