Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
776845f3
Commit
776845f3
authored
Aug 06, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect problematic resurrections
parent
22fe529e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
TestBase.cs
StackExchange.Redis.Tests/TestBase.cs
+1
-0
PhysicalBridge.cs
StackExchange.Redis/StackExchange/Redis/PhysicalBridge.cs
+1
-0
RedisSubscriber.cs
StackExchange.Redis/StackExchange/Redis/RedisSubscriber.cs
+12
-0
No files found.
StackExchange.Redis.Tests/TestBase.cs
View file @
776845f3
...
@@ -261,6 +261,7 @@ protected IServer GetAnyMaster(ConnectionMultiplexer muxer)
...
@@ -261,6 +261,7 @@ protected IServer GetAnyMaster(ConnectionMultiplexer muxer)
muxer
.
ConnectionFailed
+=
OnConnectionFailed
;
muxer
.
ConnectionFailed
+=
OnConnectionFailed
;
muxer
.
MessageFaulted
+=
(
msg
,
ex
,
origin
)
=>
Writer
?.
WriteLine
(
$"Faulted from '
{
origin
}
': '
{
msg
}
' - '
{(
ex
==
null
?
"(null)"
:
ex
.
Message
)}
'"
);
muxer
.
MessageFaulted
+=
(
msg
,
ex
,
origin
)
=>
Writer
?.
WriteLine
(
$"Faulted from '
{
origin
}
': '
{
msg
}
' - '
{(
ex
==
null
?
"(null)"
:
ex
.
Message
)}
'"
);
muxer
.
Connecting
+=
(
e
,
t
)
=>
Writer
.
WriteLine
(
$"Connecting to
{
Format
.
ToString
(
e
)}
as
{
t
}
"
);
muxer
.
Connecting
+=
(
e
,
t
)
=>
Writer
.
WriteLine
(
$"Connecting to
{
Format
.
ToString
(
e
)}
as
{
t
}
"
);
muxer
.
Resurrecting
+=
(
e
,
t
)
=>
Writer
.
WriteLine
(
$"Resurrecting
{
Format
.
ToString
(
e
)}
as
{
t
}
"
);
muxer
.
Closing
+=
complete
=>
Writer
.
WriteLine
(
complete
?
"Closed"
:
"Closing..."
);
muxer
.
Closing
+=
complete
=>
Writer
.
WriteLine
(
complete
?
"Closed"
:
"Closing..."
);
return
muxer
;
return
muxer
;
}
}
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalBridge.cs
View file @
776845f3
...
@@ -467,6 +467,7 @@ internal void OnHeartbeat(bool ifConnectedOnly)
...
@@ -467,6 +467,7 @@ internal void OnHeartbeat(bool ifConnectedOnly)
if
(!
ifConnectedOnly
)
if
(!
ifConnectedOnly
)
{
{
Multiplexer
.
Trace
(
"Resurrecting "
+
ToString
());
Multiplexer
.
Trace
(
"Resurrecting "
+
ToString
());
Multiplexer
.
OnResurrecting
(
ServerEndPoint
?.
EndPoint
,
ConnectionType
);
GetConnection
(
null
);
GetConnection
(
null
);
}
}
break
;
break
;
...
...
StackExchange.Redis/StackExchange/Redis/RedisSubscriber.cs
View file @
776845f3
...
@@ -253,6 +253,7 @@ internal bool Validate(ConnectionMultiplexer multiplexer, RedisChannel channel)
...
@@ -253,6 +253,7 @@ internal bool Validate(ConnectionMultiplexer multiplexer, RedisChannel channel)
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
;
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
;
internal
event
Action
<
bool
>
Closing
;
internal
event
Action
<
bool
>
Closing
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Connecting
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Connecting
;
internal
event
Action
<
EndPoint
,
ConnectionType
>
Resurrecting
;
#else
#else
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
internal
event
Action
<
string
,
Exception
,
string
>
MessageFaulted
{
// completely empty shell event, just to keep the test suite compiling
{
// completely empty shell event, just to keep the test suite compiling
...
@@ -266,6 +267,10 @@ internal bool Validate(ConnectionMultiplexer multiplexer, RedisChannel channel)
...
@@ -266,6 +267,10 @@ internal bool Validate(ConnectionMultiplexer multiplexer, RedisChannel channel)
{
// completely empty shell event, just to keep the test suite compiling
{
// completely empty shell event, just to keep the test suite compiling
add
{
}
remove
{
}
add
{
}
remove
{
}
}
}
internal
event
Action
<
EndPoint
,
ConnectionType
>
Resurrecting
{
// completely empty shell event, just to keep the test suite compiling
add
{
}
remove
{
}
}
#endif
#endif
[
Conditional
(
"TEST"
)]
[
Conditional
(
"TEST"
)]
...
@@ -289,6 +294,13 @@ internal void OnConnecting(EndPoint endpoint, ConnectionType connectionType)
...
@@ -289,6 +294,13 @@ internal void OnConnecting(EndPoint endpoint, ConnectionType connectionType)
{
{
#if TEST
#if TEST
Connecting
?.
Invoke
(
endpoint
,
connectionType
);
Connecting
?.
Invoke
(
endpoint
,
connectionType
);
#endif
}
[
Conditional
(
"TEST"
)]
internal
void
OnResurrecting
(
EndPoint
endpoint
,
ConnectionType
connectionType
)
{
#if TEST
Resurrecting
.
Invoke
(
endpoint
,
connectionType
);
#endif
#endif
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment