monkey92t
afafeda8a3
after the connection pool is closed, no new connections should be added ( #1863 )
...
* after the connection pool is closed, no new connections should be added
Signed-off-by: monkey92t <golang@88.com>
* remove runGoroutine
Signed-off-by: monkey92t <golang@88.com>
* pool.popIdle add p.closed check
Signed-off-by: monkey92t <golang@88.com>
* upgrade golangci-lint v1.42.0
Signed-off-by: monkey92t <golang@88.com>
2021-08-19 16:56:23 +08:00
monkey92t
fd3025bfed
Revert "ConnPool check fd for bad conns ( #1824 )" ( #1849 )
...
This reverts commit 346bfafddd
.
2021-08-06 17:16:22 +08:00
do it
346bfafddd
ConnPool check fd for bad conns ( #1824 )
...
* conncheck for badconn (#1821 )
* format imports
* fix ut: pool with badconn
* fix unstable ut: should facilitate failover
* Revert "fix unstable ut: should facilitate failover"
This reverts commit c7eeca2a5c
.
* fix test error
Signed-off-by: monkey92t <golang@88.com>
Co-authored-by: hidu <duv123+github@gmail.com>
Co-authored-by: monkey92t <golang@88.com>
2021-07-20 17:23:48 +08:00
ktaekwon000
ce40cd942a
Allow FIFO pool in redis client ( #1820 )
...
* Initial commit for FIFO pool
* Change PoolType string to PoolFIFO bool
* Remove redundant type
* add PoolFIFO option to all clients
Signed-off-by: monkey92t <golang@88.com>
Co-authored-by: Kim Tae Kwon <taekwon.kim@shopee.com>
Co-authored-by: monkey92t <golang@88.com>
2021-07-16 11:58:01 +08:00
Vladimir Mihailenco
27e2efb0af
Remove OpenTelemetry metrics for now ( #1805 )
2021-06-30 18:40:23 +08:00
monkey
26373ef2f1
follow to golang-lint 1.40
...
Signed-off-by: monkey <golang@88.com>
2021-05-13 10:33:38 +08:00
monkey
a2410beb43
upgrade golangci-lint to v1.39.0
...
Signed-off-by: monkey <golang@88.com>
2021-04-08 14:44:31 +08:00
Vladimir Mihailenco
76fd0eac61
Fix Tx pipeline hook
2021-01-09 09:57:46 +02:00
Vladimir Mihailenco
c357d18624
Faster renew the subscription
2020-09-05 10:56:09 +03:00
Vladimir Mihailenco
6db422f051
Port pool fixes
2020-08-15 15:45:15 +03:00
刘青
8a3f304b25
Log with context to associate all log by traceID ( #1413 )
...
* Log with context to associate all log by traceID
2020-07-18 09:04:36 +03:00
Vladimir Mihailenco
f2645d373d
Merge pull request #1405 from fishy/atomic-value-last-dial-error
...
Use atomic.Value instead of lock for ConnPool.lastDialError
2020-07-16 10:41:42 +03:00
Vladimir Mihailenco
14c843ef89
gofumports
2020-07-16 09:52:07 +03:00
Tiger He
62469e4f42
Introduce metrics capture with OpenTelemetry ( #1398 )
...
* internal: Add instrumentation
Co-authored-by: reggiemcdonald <regmcdonald95@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-07-15 12:07:07 +03:00
Yuxuan 'fishy' Wang
4f70db6849
Use atomic.Value instead of lock for ConnPool.lastDialError
...
This makes the reading and writing of lastDialError from the pool
faster, as atomic.Value is much more lightweight than the mutex.
Note that using error in atomic.Value directly could cause panics,
because errors could have inconsistent types. Thus wrap them with a
simple struct.
2020-07-14 11:25:59 -07:00
Vladimir Mihailenco
3dcb844106
Bump major version
2020-05-19 08:52:38 +03:00
wanglei6
39881392de
code fmt
2020-04-30 17:46:50 +08:00
wanglei6
4d5f8a5df3
fix data race
2020-04-30 14:34:48 +08:00
Ou Changkun
cb2d1c89e6
internal/pool: exit conn pool fast ( #1155 )
...
* internal/pool: exit conn pool reaper fast
2019-09-09 11:50:28 +03:00
Vladimir Mihailenco
e694ed0084
Cleanup
2019-08-18 17:11:07 +03:00
Vladimir Mihailenco
4d3ed95bd9
Add conn health check
2019-08-09 15:11:52 +03:00
Vladimir Mihailenco
7779accbea
Use semantic import versioning
2019-08-08 14:29:44 +03:00
Vladimir Mihailenco
2927e15b6b
Retry BadConnError
2019-08-08 11:44:55 +03:00
Vladimir Mihailenco
27f3b27893
Fix names
2019-08-07 16:12:01 +03:00
Vladimir Mihailenco
6d8db67ef5
Cleanup
2019-07-28 10:53:40 +03:00
waterandair
6cd6cd828f
protect pollSize and idleConnsLen with mutex ( #1105 )
...
Fix poolSize and idleConnsLen when conn can't be created
2019-07-28 09:56:57 +03:00
Vladimir Mihailenco
f3ce3362a0
Add golangci-lint
2019-07-25 14:36:50 +03:00
Vladimir Mihailenco
2cbb5194fb
Fix WithContext and add tests
2019-07-04 11:57:54 +03:00
Vladimir Mihailenco
717362d3e9
Inc StaleConns in ReapStaleConns
2019-06-24 15:27:03 +03:00
Vladimir Mihailenco
3bdf64784a
Cleanup
2019-06-17 12:32:40 +03:00
Vladimir Mihailenco
aa5f492665
internal/pool: cleanup
2019-06-15 10:34:38 +03:00
Vladimir Mihailenco
880e05d975
Cleanup
2019-06-14 16:00:03 +03:00
Vladimir Mihailenco
f8704e4b6b
Cleanup
2019-06-09 12:29:23 +03:00
Vladimir Mihailenco
35932b7961
Check context.Done while waiting for a connection
2019-06-08 15:36:00 +03:00
Vladimir Mihailenco
53c8a4a6b7
Pass context to Dialer
2019-06-04 14:26:26 +03:00
Vladimir Mihailenco
b706478fdc
Fix MinIdleConns and MaxConnAge
2019-03-25 13:02:31 +02:00
Vladimir Mihailenco
5146fb0c57
Cleanup buffers manipulation
2018-08-15 11:53:15 +03:00
Vladimir Mihailenco
651e9fef1d
Add MaxConnAge
2018-08-12 10:25:16 +03:00
Vladimir Mihailenco
25bf3e79e5
Add MinIdleConns
2018-08-12 08:34:06 +03:00
Vladimir Mihailenco
b576fe91a1
Use single read and write buffer where possible
2018-08-04 13:09:22 +03:00
Vladimir Mihailenco
faf5666fbd
Cleanup pool
2018-05-29 17:29:47 +03:00
Dimitrij Denissenko
dac1820e47
Fix pool panics
2017-10-11 16:03:55 +01:00
Vladimir Mihailenco
bc5f9a6878
Replace PoolStats.Requests with PoolStats.Misses
2017-09-22 12:28:08 +03:00
Vladimir Mihailenco
5294b5dae1
Add PoolStats.StaleConns and enable logging by default
2017-09-11 09:10:17 +03:00
Vladimir Mihailenco
89515eebd1
Merge pull request #612 from okmeter/master
...
Stop ConnPool.tryDial for closed pool
2017-08-04 14:44:34 +03:00
Nikolay Sivko
7ae26b74bc
stop ConnPool.tryDial goroutine if pool was closed
2017-08-04 01:11:35 +03:00
Vladimir Mihailenco
fbc8000fd1
Resent client pool when sentinel switches master
2017-06-29 16:53:49 +03:00
Vladimir Mihailenco
9cf5f251be
Gracefully handle situation when Redis Server is down
2017-06-29 14:45:31 +03:00
Vladimir Mihailenco
0a965c5d70
pool: add fast path
2017-06-29 12:54:49 +03:00
Vladimir Mihailenco
6499563e07
PubSub conns don't share connection pool limit
2017-04-17 16:59:56 +03:00