Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
4a7c3c5a
Commit
4a7c3c5a
authored
6 years ago
by
cdjgit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code style
parent
aca3a0e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
consistent_hashing_load_balancer.cpp
src/brpc/policy/consistent_hashing_load_balancer.cpp
+2
-2
No files found.
src/brpc/policy/consistent_hashing_load_balancer.cpp
View file @
4a7c3c5a
...
...
@@ -124,7 +124,7 @@ namespace {
pthread_once_t
s_replica_policy_once
=
PTHREAD_ONCE_INIT
;
const
std
::
array
<
const
ReplicaPolicy
*
,
CONS_HASH_LB_LAST
>*
g_replica_policy
=
nullptr
;
void
init_replica_p
olicy
()
{
void
InitReplicaP
olicy
()
{
g_replica_policy
=
new
std
::
array
<
const
ReplicaPolicy
*
,
CONS_HASH_LB_LAST
>
({
new
DefaultReplicaPolicy
(
MurmurHash32
),
new
DefaultReplicaPolicy
(
MD5Hash32
),
...
...
@@ -133,7 +133,7 @@ void init_replica_policy() {
}
inline
const
ReplicaPolicy
*
GetReplicaPolicy
(
ConsistentHashingLoadBalancerType
type
)
{
pthread_once
(
&
s_replica_policy_once
,
init_replica_p
olicy
);
pthread_once
(
&
s_replica_policy_once
,
InitReplicaP
olicy
);
return
g_replica_policy
->
at
(
type
);
}
...
...
This diff is collapsed.
Click to expand it.
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