Commit Graph

261 Commits

Author SHA1 Message Date
lawmatsuyama dd7fefe738 change otel/label for otel/attribute 2021-03-03 22:43:10 -03:00
Vladimir Mihailenco 2c9c526023 Wait for the goroutine to finish 2020-12-06 17:09:22 +02:00
Vladimir Mihailenco 02ccf05ed0 Close the conn on context timeout 2020-12-06 11:14:07 +02:00
Vladimir Mihailenco 55a8f1a601
Merge pull request #1567 from go-redis/feature/otel-0.14
Update to otel v0.14
2020-11-21 10:12:54 +02:00
Vladimir Mihailenco 3921cd497c Update to otel v0.14 2020-11-21 09:56:52 +02:00
Mitsuo Heijo f5a1707d3c Update golangci-lint to v1.32 2020-11-17 23:08:15 +09:00
Vladimir Mihailenco 13782c03d0 Tweak otel span and attr names 2020-11-15 14:30:27 +02:00
Vladimir Mihailenco e99a39201b Add hooks to Conn. Fixes #1539 2020-10-17 15:21:09 +03:00
Vladimir Mihailenco 566840fe27 otel: add RemoteAddr 2020-09-28 17:35:49 +03:00
Scott Parkerson 26a6d4714c Fixes #1386; pipeline.Exec() sometimes returns spurious `StatusCmd`
This is caused by function `wrapMultiExec` sometimes clobbering the caller's
cmd slice, corrupting future requests.
2020-09-17 10:53:55 -04:00
Vladimir Mihailenco c5d4b71f66 Fix race 2020-09-17 12:36:10 +03:00
Vladimir Mihailenco 297e671f5e Properly propagate context error 2020-09-17 11:23:34 +03:00
Pavlov Aleksey eda1f9c6ad add context cancelation support for blocking operations 2020-09-17 11:23:12 +03:00
Vladimir Mihailenco 69287d7ea9 Make sure to call after hook on error 2020-09-10 17:36:36 +03:00
Vladimir Mihailenco 5aaa6c6207 Change hooks to be LIFO 2020-09-10 09:22:51 +03:00
Vladimir Mihailenco 6db422f051 Port pool fixes 2020-08-15 15:45:15 +03:00
Vladimir Mihailenco 21a1f58caf Retry timeout and retryable error 2020-07-24 15:52:15 +03:00
Vladimir Mihailenco ef82e3705c Add OnConnect context 2020-06-10 10:36:22 +03:00
Vladimir Mihailenco 4440575966 Merge branch 'v8' 2020-05-21 10:16:44 +03:00
Vladimir Mihailenco a7c11d9699
Merge pull request #1285 from kudrykv/issue-1279
Use an interface for logging
2020-05-21 10:08:11 +03:00
filipe oliveira cf6cf7f450 Add AuthACL 2020-05-21 08:59:51 +03:00
Vladimir Mihailenco 3dcb844106 Bump major version 2020-05-19 08:52:38 +03:00
Vladimir Mihailenco f5593121e0 Add ctx as first arg 2020-05-19 08:52:38 +03:00
Vitaliy Kudryk 39272697aa
issue-1279 update logging 2020-03-30 17:02:17 +03:00
Vladimir Mihailenco 218b17f0fc Include multi & exec in pipeline hook 2020-02-14 15:55:16 +02:00
Vladimir Mihailenco 2e3402d33d Don't allocate tmp slice in txPipelineWriteMulti 2020-02-14 12:55:59 +02:00
Vladimir Mihailenco 512e6c7a40 Unexport Clone and Lock from embedded hooks 2020-02-12 13:02:09 +02:00
git-hulk d52b11cb42 Exported the setErr function as public 2020-02-03 17:53:47 +08:00
Vladimir Mihailenco d2e52839ee Add WithTimeout 2020-02-02 14:59:27 +02:00
Vladimir Mihailenco bdcf7a49a2 Set an error returned from the hook on the Cmd 2020-02-02 11:55:35 +02:00
Vladimir Mihailenco db45a825cc Remove SetLimiter 2020-02-02 11:09:27 +02:00
Vladimir Mihailenco c0fcf85f12 Add missing Tx instrumentation 2019-12-29 12:14:02 +02:00
Vladimir Mihailenco 152e52f203 Fix WithContext race 2019-08-24 12:40:23 +03:00
Vladimir Mihailenco 5776216677 Cleanup 2019-08-24 11:55:13 +03:00
Vladimir Mihailenco 39b67358d7 Retry timeout by default 2019-08-12 15:20:27 +03:00
Vladimir Mihailenco f6fc23d2fa Move key to ZStore 2019-08-09 16:23:56 +03:00
Vladimir Mihailenco 2a46cb006d Add withConn and set cmd errors more consistently 2019-08-09 13:53:05 +03:00
Vladimir Mihailenco 7779accbea Use semantic import versioning 2019-08-08 14:29:44 +03:00
Vladimir Mihailenco 48224a399f Remove releaseConnStrict 2019-08-08 11:44:55 +03:00
Vladimir Mihailenco 2927e15b6b Retry BadConnError 2019-08-08 11:44:55 +03:00
Vladimir Mihailenco 056ad27792 Cleanup 2019-08-07 16:57:48 +03:00
Vladimir Mihailenco 4e9cea8876 Add proper SingleConnPool implementation 2019-08-03 17:31:28 +03:00
Vladimir Mihailenco c837612911 Cancel sleep when context is cancelled 2019-07-30 12:13:00 +03:00
Vladimir Mihailenco 52ec525849 Propagate context in Pipeline 2019-07-25 13:28:15 +03:00
Vladimir Mihailenco 9fd4e69ce4 Don't return a context from After* hooks 2019-07-11 11:58:46 +03:00
Vladimir Mihailenco e3bb77e6eb Call all After* hooks and return first error 2019-07-09 10:02:40 +03:00
Vladimir Mihailenco 2cbb5194fb Fix WithContext and add tests 2019-07-04 11:57:54 +03:00
Vladimir Mihailenco 3bdf64784a Cleanup 2019-06-17 12:32:40 +03:00
Vladimir Mihailenco 880e05d975 Cleanup 2019-06-14 16:00:03 +03:00
Vladimir Mihailenco 5460bc10f2 Use Context.Deadline to set net.Conn deadline 2019-06-08 15:02:51 +03:00
Vladimir Mihailenco 53c8a4a6b7 Pass context to Dialer 2019-06-04 14:26:26 +03:00
Vladimir Mihailenco 09eb108738 Allow passing context where possible 2019-06-04 13:30:47 +03:00
Vladimir Mihailenco 84422d7ae7 Speedup WithContext 2019-05-31 17:31:54 +03:00
Vladimir Mihailenco 8476dfea4a Replace Wrap* with hooks that support context 2019-05-31 16:36:57 +03:00
Kirill Motkov eca4e5d04c Some code improvements
* Rewrite if-else chain as a switch.
* Rewrite switch statement with only one case as if.
* Remove always true condition.
* Simplify some functions.
2019-04-17 16:14:30 +03:00
Vladimir Mihailenco b706478fdc Fix MinIdleConns and MaxConnAge 2019-03-25 13:02:31 +02:00
Vladimir Mihailenco 9409a4baf0 Remove limiter copy 2018-12-13 10:31:02 +02:00
Vladimir Mihailenco 1d1269e0cf
Merge pull request #884 from go-redis/feature/limiter
Add Limiter interface
2018-11-29 11:21:03 +02:00
Vladimir Mihailenco 5d8c5c5c37 Add Limiter interface 2018-11-29 09:52:49 +02:00
Rob McColl a47799f02c
doc: add info about Receive call after Subscribe 2018-11-27 16:13:30 -05:00
Vladimir Mihailenco fa76dd0e87 Add releaseConnStrict 2018-10-14 11:27:34 +03:00
Andrii Kushch dc24d98c71 remove redundant expression 2018-10-11 12:53:40 +02:00
Vladimir Mihailenco 40dbb03d62 Set cmd timeout when Block >= 0 2018-09-13 09:28:01 +03:00
Vladimir Mihailenco 0197108027 Use bufio.Writer 2018-08-17 14:14:02 +03:00
Vladimir Mihailenco 5146fb0c57 Cleanup buffers manipulation 2018-08-15 11:53:15 +03:00
Vladimir Mihailenco 7c26d1ceb6 Pass cn.Rd where possible 2018-08-15 09:38:58 +03:00
Vladimir Mihailenco d5fc79d4ee Add Client.Do 2018-08-12 11:20:24 +03:00
Vladimir Mihailenco 651e9fef1d Add MaxConnAge 2018-08-12 10:25:16 +03:00
Vladimir Mihailenco ea9da7c2e8 Rework ReceiveMessage 2018-07-23 17:10:58 +03:00
Vladimir Mihailenco b92dacbfa7 Conn timeout should be higher than read timeout 2018-07-22 08:49:48 +03:00
Vladimir Mihailenco faf5666fbd Cleanup pool 2018-05-29 17:29:47 +03:00
Vladimir Mihailenco 20363d149b Fix WithContext followed by WrapProcess 2018-03-13 15:51:38 +02:00
Vladimir Mihailenco d6cb688ea7 Cleanup context implementation 2018-03-07 13:50:14 +02:00
Vladimir Mihailenco 3a38e90858 Require Go 1.7+ and use context.Context 2018-03-07 13:43:52 +02:00
Vladimir Mihailenco f13fc5381c Extract commands info cache 2018-03-07 12:09:45 +02:00
Vladimir Mihailenco 56dea1f39a Fix proto.RedisError in slices 2018-02-22 14:24:27 +02:00
yifei.huang 8b4fa6d443 Add WrapProcessPipeline 2018-01-30 16:47:29 +02:00
Veselkov Konstantin ea4d6c3490 golint warnings are removed 2018-01-24 22:38:47 +04:00
Vladimir Mihailenco 624096af5e Mention redis.Nil 2017-12-27 13:29:46 +02:00
Vladimir Mihailenco 7cb146a31b Increase read timeout for blocking commands and don't retry such commands 2017-09-29 16:12:43 +03:00
Vladimir Mihailenco f9307ab2fe Add TxPipeline to Cmdable 2017-09-25 11:48:44 +03:00
Vladimir Mihailenco 09176ef4fa PoolStats is an alias for pool.Stats 2017-09-11 10:12:00 +03:00
Vladimir Mihailenco 5294b5dae1 Add PoolStats.StaleConns and enable logging by default 2017-09-11 09:10:17 +03:00
Vladimir Mihailenco dbd2c99ba9 Rework pipeline retrying 2017-09-01 14:56:00 +03:00
wenjun.yan 4e1d2a01db Make readOnly a private field so that only cluster client can use it 2017-07-25 10:35:41 +09:00
Vladimir Mihailenco 3ddda73a05 Close connections to unused nodes 2017-07-11 11:19:40 +03:00
Vladimir Mihailenco 6060f097e1 Add PubSub support to Cluster client 2017-07-09 10:07:20 +03:00
Vladimir Mihailenco 167410bcd7 Improve comment 2017-06-17 12:43:19 +03:00
Vladimir Mihailenco ee42c3d5d3 Merge pull request #571 from go-redis/fix/on-connect
Fix/on connect
2017-05-26 14:56:40 +03:00
Vladimir Mihailenco 4a3a300665 Add Options.OnConnect 2017-05-26 14:56:18 +03:00
Jonathan Chan 406e882c43 Added backoff retry 2017-05-26 14:33:34 +03:00
Vladimir Mihailenco 7e8890b644 Embed Cmdable into StatefulCmdable 2017-05-25 13:38:04 +03:00
Felipe Cavalcanti 7379f211a4 Client TxPipeline method should also return a Pipeliner 2017-05-03 10:48:12 -03:00
Felipe Cavalcanti eeb4d09198 rename Pipelineable to Pipeliner 2017-05-02 12:00:53 -03:00
Felipe Cavalcanti 6fca4d5ad0 pipeline now has its own interface "Pipelineable" 2017-05-01 12:42:58 -03:00
Vladimir Mihailenco 9ebd89772a Rework PubSub conn management 2017-04-24 13:41:03 +03:00
Vladimir Mihailenco 7646d48e29 Initialize PubSub connection 2017-04-18 13:12:38 +03:00
Vladimir Mihailenco 6499563e07 PubSub conns don't share connection pool limit 2017-04-17 16:59:56 +03:00
shaoguang d910e51498 pipelineReadCmds always retry=true, maybe bug 2017-04-12 20:11:20 +08:00
Vladimir Mihailenco 8d52a95269 Simplify PubSub API 2017-04-11 16:53:55 +03:00