The system keyspace has a replication factor of 1 and is local to each node; it is therefore recommended to query system.local with a consistency level of ONE or LOCAL_ONE.

Stronger consistency levels may result in an Unavailable error, but this does not mean that the node is down.

This patch does not include additional tests because it is hard to test the change in a stubbed environment; obviously, the existing tests still pass. Let me know if I can contribute an integration test for that.

Comment From: pivotal-issuemaster

@adutra Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-issuemaster

@adutra Thank you for signing the Contributor License Agreement!

Comment From: snicoll

@adutra thank you very much for making your first contribution to Spring Boot.

We had to fix this one in 2.1.x and 2.2.x so I've adapted your contribution to the previous Cassandra API, see this commit for 2.1.x. Along the way, I've harmonized that check that you've just said is faulty so please let me know what it should be for the new and the previous API.

Comment From: adutra

@snicoll I would simply remove the check, since the query can either fail or return one row exactly. The reactive version of the check does that btw.

Speaking of reactive, CassandraReactiveHealthIndicator should be amended as well. I just pushed another commit to my branch but too late :-) Would you mind cherry-picking https://github.com/adutra/spring-boot/commit/2f0df4f00735260f35e58cee0c34975b6ffe841a ? Thanks!

Comment From: snicoll

I would simply remove the check, since the query can either fail or return one row exactly.

Does that apply to the previous version of the SDK as well?

Comment From: adutra

I would simply remove the check, since the query can either fail or return one row exactly.

Does that apply to the previous version of the SDK as well?

Yes.

Comment From: snicoll

@adutra I've harmonized the reactive health indicator. I've also created an extra bug for the fact we never expose the version attribute (see #20179). Thanks for the feedback!