You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.
I have a dropwizard application which uses dropwizard-cassandra. I have noticed that despite my application queries always succeeding, the provided CassandraHealthCheck is reporting failures and causing my application to report unhealthy.
After some investigation, I realized the root cause of this is that the query used in the health check is not marked idempotent and the Cassandra driver will not retry that query in accordance to the retry policy of the application. The other SELECT queries in my application are marked idempotent, and will be retried. When they fail, it is after the retry policy has been exhausted.
In most cases, you must set that flag manually. The driver does not parse query strings, so it can’t infer it automatically (except for statements coming from the query builder, see below).
I believe to fix these spurious failures is to mark the validation query as idempotent in the health check or allow disabling the health check in the config so users can specify their own health check that has a query marked as idempotent.
To work around this in my application, I am unregistering the health check that is auto registered by CassandraHealthCheck and providing my own health check with a query marked as idempotent.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a dropwizard application which uses dropwizard-cassandra. I have noticed that despite my application queries always succeeding, the provided
CassandraHealthCheck
is reporting failures and causing my application to report unhealthy.After some investigation, I realized the root cause of this is that the query used in the health check is not marked idempotent and the Cassandra driver will not retry that query in accordance to the retry policy of the application. The other SELECT queries in my application are marked idempotent, and will be retried. When they fail, it is after the retry policy has been exhausted.
From the documentation on idempotence:
I believe to fix these spurious failures is to mark the validation query as idempotent in the health check or allow disabling the health check in the config so users can specify their own health check that has a query marked as idempotent.
To work around this in my application, I am unregistering the health check that is auto registered by
CassandraHealthCheck
and providing my own health check with a query marked as idempotent.The text was updated successfully, but these errors were encountered: