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
88f9d236
Commit
88f9d236
authored
Dec 02, 2015
by
hrishi18pathak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CR feedback
parent
87d4dc84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+15
-13
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
88f9d236
...
...
@@ -1208,7 +1208,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
ServerEndPoint
[]
servers
=
null
;
Task
<
string
>[]
tieBreakers
=
null
;
bool
encounteredConnectedServer
=
false
;
bool
encounteredConnected
Cluster
Server
=
false
;
Stopwatch
watch
=
null
;
int
iterCount
=
first
?
2
:
1
;
...
...
@@ -1258,7 +1258,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
Trace
(
"Allowing endpoints "
+
TimeSpan
.
FromMilliseconds
(
remaining
)
+
" to respond..."
);
await
WaitAllIgnoreErrorsAsync
(
available
,
remaining
,
log
).
ForAwait
();
EndPointCollection
updatedEndpointCollection
=
null
;
EndPointCollection
updated
Cluster
EndpointCollection
=
null
;
for
(
int
i
=
0
;
i
<
available
.
Length
;
i
++)
{
var
task
=
available
[
i
];
...
...
@@ -1285,14 +1285,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
{
servers
[
i
].
ClearUnselectable
(
UnselectableFlags
.
DidNotRespond
);
LogLocked
(
log
,
"{0} returned with success"
,
Format
.
ToString
(
endpoints
[
i
]));
if
(!
encounteredConnectedServer
)
{
// we have encountered a connected server for the first time.
// so we will get list of other nodes from this server using "CLUSTER NODES" command
// and try to connect to these other nodes in the next iteration
encounteredConnectedServer
=
true
;
updatedEndpointCollection
=
GetEndpointsFromClusterNodes
(
server
,
log
);
}
// count the server types
switch
(
server
.
ServerType
)
{
...
...
@@ -1308,6 +1301,15 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
break
;
}
if
(
clusterCount
>
0
&&
!
encounteredConnectedClusterServer
)
{
// we have encountered a connected server with clustertype for the first time.
// so we will get list of other nodes from this server using "CLUSTER NODES" command
// and try to connect to these other nodes in the next iteration
encounteredConnectedClusterServer
=
true
;
updatedClusterEndpointCollection
=
GetEndpointsFromClusterNodes
(
server
,
log
);
}
// set the server UnselectableFlags and update masters list
switch
(
server
.
ServerType
)
{
...
...
@@ -1343,13 +1345,13 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
}
}
if
(
encounteredConnectedServer
)
if
(
encounteredConnected
Cluster
Server
)
{
endpoints
=
updatedEndpointCollection
;
endpoints
=
updated
Cluster
EndpointCollection
;
}
else
{
break
;
// w
ill be retried by the outer do while loop
break
;
// w
e do not want to repeat the second iteration
}
}
...
...
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