Redis retry configuration is potentially confusing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Read RedisConnectionPool.Configuration.init() in Sources/RediStack/ConnectionPool/RedisConnectionPool+Configuration.swift and inspect how the Vapor wrapper passes connectionRetryTimeout. Clarify whether the documented 60-second default or the 10-millisecond fallback is intended, then make the initializer behavior and public documentation consistent. The issue names no tests to run.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The Redis retry configuration is potentially confusing, and downright problematic for Vapor.
RedisConnectionPool.Configuration.init() is implemented like this. Note that it specifies a default timeout in the signature of 60 seconds, but if nil is passed in, it uses an internal timeout of 10 ms.
public init(
initialServerConnectionAddresses: [SocketAddress],
maximumConnectionCount: RedisConnectionPoolSize,
connectionFactoryConfiguration: ConnectionFactoryConfiguration,
minimumConnectionCount: Int = 1,
connectionBackoffFactor: Float32 = 2,
initialConnectionBackoffDelay: TimeAmount = .milliseconds(100),
connectionRetryTimeout: TimeAmount? = .seconds(60),
onUnexpectedConnectionClose: ((RedisConnection) -> Void)? = nil,
poolDefaultLogger: Logger? = nil
) {
self.initialConnectionAddresses = initialServerConnectionAddresses
self.maximumConnectionCount = maximumConnectionCount
self.factoryConfiguration = connectionFactoryConfiguration
self.minimumConnectionCount = minimumConnectionCount
self.connectionRetryConfiguration = (
(initialConnectionBackoffDelay, connectionBackoffFactor),
connectionRetryTimeout ?? .milliseconds(10) // always default to a baseline 10ms
)
self.onUnexpectedConnectionClose = onUnexpectedConnectionClose
self.poolDefaultLogger = poolDefaultLogger ?? .redisBaseConnectionPoolLogger
}
The Vapor wrapper around this passes nil down through its call stack.
It's not clear what the intent is in RediStack. Is a default timeout 60 seconds or 10 milliseconds? Certainly the public documentation implies it's 60 seconds, and only by a careful reading of the actual code can you determine that it ends up as 10 ms if you pass nil.
- Ngôn ngữ chính
- Swift
- Star
- 182
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của swift-server/RediStack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
swift-server/RediStack#135 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
swift-server/RediStack#133 · 5 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
swift-server/RediStack#131 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
swift-server/RediStack#129 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
swift-server/RediStack#127 ·
Tất cả issue của swift-server/RediStack
Issue tương tự
-
bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
marcovisona/arca#5 ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
luis-guillen/airy#2 ·
-
accessibility bug medium-priority mobile
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
lognorman20/monaco#6247 ·
-
documentation windows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4060 ·