-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Allow common redis and leveldb connections #12385
Conversation
The change in |
No it is not breaking. I wrote all of this to prevent it being breaking: https://github.com/go-gitea/gitea/blob/bf7080a1211b00f0bfb8f6208b6f872eae36275e/modules/nosql/redis.go#L30-L100 |
Prevents multiple reopening of redis and leveldb connections to the same place by sharing connections. Further allows for more configurable redis connection type using the redisURI and a leveldbURI scheme. Signed-off-by: Andrew Thornton <art27@cantab.net>
0ae88bc
to
8bc34e4
Compare
Codecov Report
@@ Coverage Diff @@
## master #12385 +/- ##
==========================================
- Coverage 42.84% 42.64% -0.20%
==========================================
Files 662 669 +7
Lines 73002 73493 +491
==========================================
+ Hits 31279 31344 +65
- Misses 36652 37058 +406
- Partials 5071 5091 +20
Continue to review full report at Codecov.
|
Signed-off-by: Andrew Thornton <art27@cantab.net>
I encountered an issue with this PR: I'm using the Indexer with Redis. RedisByteFIFOConfiguration is now using ConnectionString (instead of addresses / network / ...) So using queue system is going to the default => 127.0.0.1:6379 from ToRedisURI Or maybe, I miss a step in the config file? |
@GaetanJuvin could you open a new issue about this and include a sanitized copy of your config (secret data switched to FOOBAR) |
will do. |
Missed setting ConnectionString on queuesettings Signed-off-by: Andrew Thornton <art27@cantab.net>
@GaetanJuvin Thank you for the hint and sorry for the bug - I've put up a PR to fix this oversight. I'll think again about getQueueSettings it's all a bit too manual and error prone - I think we can leverage MapTo() and consider passing in the ini. |
Yep, true. "every line of code is a potential bug" :D Cheers, thanks for your work! |
…to be set Since the move to common leveldb and common redis the disk queue code (go-gitea#12385) will check the connection string before defaulting to the DATADIR. Therefore we should ensure that the connection string is kept empty unless it is actually set. Unforunately the issue indexer was missed in go-gitea#13025 this PR fixes this omission Fix go-gitea#13062 Signed-off-by: Andrew Thornton <art27@cantab.net>
…to be set (#13069) Since the move to common leveldb and common redis the disk queue code (#12385) will check the connection string before defaulting to the DATADIR. Therefore we should ensure that the connection string is kept empty unless it is actually set. Unforunately the issue indexer was missed in #13025 this PR fixes this omission Fix #13062 Signed-off-by: Andrew Thornton <art27@cantab.net>
Prevents multiple reopening of redis and leveldb connections to the same
place by sharing connections.
Further allows for more configurable redis connection type using the
redisURI and a leveldbURI scheme.
Fix #10121
Signed-off-by: Andrew Thornton art27@cantab.net