Added pattern match to handle timeouts for github Issue 86 #87
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.
riaknostic Issue #86 -- Timeout message cached in local stats and causes crash
A recent customer issue revealed a condition where their repeated calls to
riak_kv_status:statistics/0
were timing out and storing the{badrpc, timeout}
message as the stats, causingriaknostic
to crash.Reproducer
Fix
The
riaknostic_node
module is responsible for fetching and caching the stats, so a pattern match was added to thehas_stats/0
function to handle the{badrpc, Reason}
message and return as if no stats were currently cached so it will refetch in this state.Test