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

Use buffersize to reduce database connection when iterate #2724

Merged
merged 4 commits into from
Oct 21, 2017

Conversation

lunny
Copy link
Member

@lunny lunny commented Oct 17, 2017

No description provided.

@lunny lunny added the type/enhancement An improvement of existing functionality label Oct 17, 2017
@lunny lunny added this to the 1.3.0 milestone Oct 17, 2017
conf/app.ini Outdated
@@ -184,6 +184,8 @@ SSL_MODE = disable
PATH = data/gitea.db
; For "sqlite3" only. Query timeout
SQLITE_TIMEOUT = 500
; For interate buffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default setting should be mentioned too IMO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it should be For iterate buffer

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Morlinest the default is 50, this file is an example file.
@daviian done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it is good practice to comment defaults in config files (even in example files). If you search default in this file, you can find a lot of comments like ... (default false) or ... default is .... If you look at file you should know what happens if you don't set some variables.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Morlinest done.

@codecov-io
Copy link

codecov-io commented Oct 17, 2017

Codecov Report

Merging #2724 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2724   +/-   ##
=======================================
  Coverage   26.91%   26.91%           
=======================================
  Files          87       87           
  Lines       17286    17286           
=======================================
  Hits         4652     4652           
  Misses      11955    11955           
  Partials      679      679
Impacted Files Coverage Δ
models/repo.go 13.12% <0%> (ø) ⬆️
models/user.go 18.24% <0%> (ø) ⬆️

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 2112eb8...1e64ec2. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 17, 2017
conf/app.ini Outdated
@@ -184,6 +184,8 @@ SSL_MODE = disable
PATH = data/gitea.db
; For "sqlite3" only. Query timeout
SQLITE_TIMEOUT = 500
; For interate buffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it should be For iterate buffer

@lunny lunny force-pushed the lunny/reduce_conn_when_iterate branch from a06f00e to 6767a59 Compare October 20, 2017 06:13
@sapk
Copy link
Member

sapk commented Oct 20, 2017

LGTM

@tboerger tboerger 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 20, 2017
@lafriks
Copy link
Member

lafriks commented Oct 21, 2017

LGTM

@tboerger tboerger 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 21, 2017
@lunny lunny merged commit 985a395 into go-gitea:master Oct 21, 2017
@lunny lunny deleted the lunny/reduce_conn_when_iterate branch October 21, 2017 06:26
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants