Repository navigation
Conversation
service_down(Id, true) sent {service_down, Id, health_check}, which had
no handle_call/3 clause. The call crashed riak_core_node_watcher with
function_clause, and on restart every registered service and health
check on the node was lost.
Add the missing clause. It marks the service down and keeps its health
check, with the failure count raised to max_health_failures, so the next
successful check brings it back up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
riak_core_node_watcher:service_down(Id, true)sends{service_down, Id, health_check}, buthandle_call/3had no clause for it. Every call crashed the node watcher withfunction_clause. On restart it lost every service and health check registered on the node, not onlyId.Changes
handle_call({service_down, Id, health_check}, ...)clause. It marks the service down and keeps its health check, with the failure count set to at leastmax_health_failures. The next successful check brings the service back up.Tests
Checked manually on a node:
Closes #1016