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
6a40cedf
Commit
6a40cedf
authored
Jan 27, 2016
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move cluster config fetch to async
Resolves #337
parent
b60c5568
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+3
-4
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
6a40cedf
...
@@ -1320,7 +1320,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
...
@@ -1320,7 +1320,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
// so we will get list of other nodes from this server using "CLUSTER NODES" command
// 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
// and try to connect to these other nodes in the next iteration
encounteredConnectedClusterServer
=
true
;
encounteredConnectedClusterServer
=
true
;
updatedClusterEndpointCollection
=
GetEndpointsFromClusterNodes
(
server
,
log
);
updatedClusterEndpointCollection
=
await
GetEndpointsFromClusterNodes
(
server
,
log
);
}
}
// set the server UnselectableFlags and update masters list
// set the server UnselectableFlags and update masters list
...
@@ -1473,13 +1473,12 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
...
@@ -1473,13 +1473,12 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
}
}
}
}
private
EndPointCollection
GetEndpointsFromClusterNodes
(
ServerEndPoint
server
,
TextWriter
log
)
private
async
Task
<
EndPointCollection
>
GetEndpointsFromClusterNodes
(
ServerEndPoint
server
,
TextWriter
log
)
{
{
var
message
=
Message
.
Create
(-
1
,
CommandFlags
.
None
,
RedisCommand
.
CLUSTER
,
RedisLiterals
.
NODES
);
var
message
=
Message
.
Create
(-
1
,
CommandFlags
.
None
,
RedisCommand
.
CLUSTER
,
RedisLiterals
.
NODES
);
ClusterConfiguration
clusterConfig
=
null
;
try
try
{
{
clusterConfig
=
this
.
ExecuteSyncImpl
(
message
,
ResultProcessor
.
ClusterNodes
,
server
);
var
clusterConfig
=
await
ExecuteAsyncImpl
(
message
,
ResultProcessor
.
ClusterNodes
,
null
,
server
);
return
new
EndPointCollection
(
clusterConfig
.
Nodes
.
Select
(
node
=>
node
.
EndPoint
).
ToList
());
return
new
EndPointCollection
(
clusterConfig
.
Nodes
.
Select
(
node
=>
node
.
EndPoint
).
ToList
());
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
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