Skip to content

Commit

Permalink
Cluster: add clean-logs command to create-cluster script.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Apr 14, 2017
1 parent 8f7bf28 commit 6878a3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,9 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
clusterNodeFailureReportsCount(node) == 0)
{
uint32_t pongtime = ntohl(g->pong_received);
if (pongtime > node->pong_received)
if (pongtime > node->pong_received) {
node->pong_received = pongtime;
}
}

/* If we already know this node, but it is not reachable, and
Expand Down
7 changes: 7 additions & 0 deletions utils/create-cluster/create-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,17 @@ then
exit 0
fi

if [ "$1" == "clean-logs" ]
then
rm -rf *.log
exit 0
fi

echo "Usage: $0 [start|create|stop|watch|tail|clean]"
echo "start -- Launch Redis Cluster instances."
echo "create -- Create a cluster using redis-trib create."
echo "stop -- Stop Redis Cluster instances."
echo "watch -- Show CLUSTER NODES output (first 30 lines) of first node."
echo "tail <id> -- Run tail -f of instance at base port + ID."
echo "clean -- Remove all instances data, logs, configs."
echo "clean-logs -- Remove just instances logs."

0 comments on commit 6878a3f

Please sign in to comment.