* async create conn
* update default values and testcase
* fix comments
* fix data race
* remove context.WithoutCancel, which is a function introduced in Go 1.21
* fix TestDialerRetryConfiguration/DefaultDialerRetries, because tryDial are likely done in async flow
* change to share failed to delivery connection to other waiting
* remove chinese comment
* fix: optimize WantConnQueue benchmarks to prevent memory exhaustion
- Fix BenchmarkWantConnQueue_Dequeue timeout issue by limiting pre-population
- Use object pooling in BenchmarkWantConnQueue_Enqueue to reduce allocations
- Optimize BenchmarkWantConnQueue_EnqueueDequeue with reusable wantConn pool
- Prevent GitHub Actions benchmark failures due to excessive memory usage
Before: BenchmarkWantConnQueue_Dequeue ran for 11+ minutes and was killed
After: All benchmarks complete in ~8 seconds with consistent performance
* format
* fix turn leaks
---------
Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
Co-authored-by: Hristo Temelski <hristo.temelski@redis.com>
* chore: set the default value for the `options.protocol` in the `init()` of `options`
Signed-off-by: fukua95 <fukua95@gmail.com>
* add a test
Signed-off-by: fukua95 <fukua95@gmail.com>
---------
Signed-off-by: fukua95 <fukua95@gmail.com>
* run go fix ./...
Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>
* run make fmt
Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>
* fix go vet ./... issues
* Update README.md
Reorder imports with the rules defined in the Makefile
as if we run `make fmt`
* run gofumpt -w .
* update Makefile to use gofumpt instead gofmt
* increment makefile
* format test
* format tests
Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>
---------
Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com>
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
Before this change, ParseURL would only accept a very restricted
set of URLs (it returned an error, if it encountered any parameter).
This commit introduces the ability to process URLs like
redis://localhost/1?dial_timeout=10s
and similar.
Go programs which were providing a configuration tunable (e.g.
CLI flag, config entry or environment variable) to configure
the Redis connection now don't need to perform this task
themselves.
This is in preparation for supporting query parameters
in ParseURL:
- use an expected *Options instance to execute assertions on
- extract assertions into helper function
- enable parallel testing
- condense test table