You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename RedisCommandContext to RedisCommand, improve RedisCommandHandler usage semantics, and cleanup documentation.
Motivation:
During proposal review, it was noted that `RedisCommandContext` was a bit misleading, and the hidden reference semantics worrisome.
In addition, several of parts of the documentation around `RedisCommandHandler` were weak or also misleading.
Modifications:
- Rename `RedisCommandContext` to just `RedisCommand`
- Update documentation to be more explicit about the module who owns the types being referenced
- Update documentation to call out explicit usage semantics and behavior
- Change `RedisCommandHandler` to close the socket connection on error thrown
- Rename the "base" Redis Channel Handlers to be more explicitly named
Result:
Users should have clearer documentation on what happens when using `RedisCommandHandler` and `RedisCommand` without hidden semantics.
This contributes to issue #47.
/// Invoked by NIO when an error has been thrown. The command response promise at the front of the queue will be
57
-
/// failed with the error.
70
+
/// Invoked by SwiftNIO when an error has been thrown. The command queue will be drained, with each promise in the queue being failed with the error thrown.
58
71
///
59
-
/// See `ChannelInboundHandler.errorCaught(context:error:)`
72
+
/// See `NIO.ChannelInboundHandler.errorCaught(context:error:)`
73
+
/// - Important: This will also close the socket connection to Redis.
74
+
/// - Note:`RedisMetrics.commandFailureCount` is **not** incremented from this error.
75
+
///
76
+
/// A `Logging.LogLevel.critical` message will be written with the caught error.
0 commit comments