Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
af6d5c59
Unverified
Commit
af6d5c59
authored
Mar 03, 2022
by
Binbin
Committed by
GitHub
Mar 02, 2022
Browse files
Constrain cluster node name logging (#10376)
Cluster node name is not null terminated, so need to be constrained.
parent
feb032fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
af6d5c59
...
...
@@ -796,7 +796,7 @@ void setClusterNodeToInboundClusterLink(clusterNode *node, clusterLink *link) {
* we would always process the disconnection of the existing inbound link before
* accepting a new existing inbound link. Therefore, it's possible to have more than
* one inbound link from the same node at the same time. */
serverLog
(
LL_DEBUG
,
"Replacing inbound link fd %d from node %s with fd %d"
,
serverLog
(
LL_DEBUG
,
"Replacing inbound link fd %d from node %
.40
s with fd %d"
,
node
->
inbound_link
->
conn
->
fd
,
node
->
name
,
link
->
conn
->
fd
);
}
node
->
inbound_link
=
link
;
...
...
@@ -2213,7 +2213,7 @@ int clusterProcessPacket(clusterLink *link) {
if
(
type
==
CLUSTERMSG_TYPE_PING
||
type
==
CLUSTERMSG_TYPE_PONG
||
type
==
CLUSTERMSG_TYPE_MEET
)
{
serverLog
(
LL_DEBUG
,
"%s packet received: %s"
,
serverLog
(
LL_DEBUG
,
"%s packet received: %
.40
s"
,
clusterGetMessageTypeString
(
type
),
link
->
node
?
link
->
node
->
name
:
"NULL"
);
if
(
!
link
->
inbound
)
{
...
...
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