Redis retry configuration is potentially confusing
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Swift
- Sterne
- 182
- Forks
- 29
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus swift-server/RediStack
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
swift-server/RediStack#135 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
swift-server/RediStack#133 · 5 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
swift-server/RediStack#131 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
swift-server/RediStack#129 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
swift-server/RediStack#127 ·
Alle Issues in swift-server/RediStack
Ähnliche Issues
-
[Bug] Library write-failure banner cannot be dismissed or collapsedEvtl. vergeben @JoeyWu-tech hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
yetone/magpie#3745 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
deltachat/deltachat-ios#3411 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 14 Tagen
-
[java] "Not a Java binary name" when importing a class with non-ASCII (e.g. Japanese) letters in its name; the whole file is skippedEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offena:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
vorssaint/vorssaint-utils#3527 ·
Maintainer antworten meist innerhalb von 1 Tag