Skip to content

cluster: improve logging of peers row validation #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

avelanarius
Copy link

@avelanarius avelanarius commented Mar 1, 2024

Before this change, when the driver received an invalid system.peers row it would log a very general warning:

Found an invalid row for peer (127.0.73.5). Ignoring host.

A system.peers row can be invalid for a multitude of reasons and that warning message did not describe the specific reason for the failure.

Improve the warning message by adding a specific reason why the row is considered invalid by the driver. The message now also includes the host_id or the entire row (in case the driver received a row without even the basic broadcast_rpc).

It might be a bit inelegant to introduce a side effect (logging) to the _is_valid_peer static method, however the alternative solution seemed even worse - adding that code to the already big _refresh_node_list_and_token_map.

Fixes #303

Before this change, when the driver received an invalid system.peers row
it would log a very general warning:

    Found an invalid row for peer (127.0.73.5). Ignoring host.

A system.peers row can be invalid for a multitude of reasons and that
warning message did not describe the specific reason for the failure.

Improve the warning message by adding a specific reason why the row
is considered invalid by the driver. The message now also includes
the host_id or the entire row (in case the driver received a row
without even the basic broadcast_rpc).

It might be a bit inelegant to introduce a side effect (logging) to
the _is_valid_peer static method, however the alternative solution seemed
even worse - adding that code to the already big
_refresh_node_list_and_token_map.

Fixes scylladb#303
@avelanarius avelanarius requested a review from Lorak-mmk March 1, 2024 15:50
@avelanarius avelanarius force-pushed the improve-is-valid-peer-logs branch from ba8b4b3 to 3815f53 Compare March 1, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "Found an invalid row for peer" error is obscure
2 participants