Skip to content
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

Spring Actuator support #69

Open
rbleuse opened this issue Apr 18, 2022 · 1 comment
Open

Spring Actuator support #69

rbleuse opened this issue Apr 18, 2022 · 1 comment

Comments

@rbleuse
Copy link
Contributor

rbleuse commented Apr 18, 2022

Hi Patrick,

I'd like to implement an actuator endpoint to check migration status, similar to #39
This PR targets the v3 branch, and things changed quite a bit with the v4 driver so we can't just port this solution to the v4 branch.

Furthermore, since the session is closed after migrations, we definitely can't just create a Database bean as we can't reuse it after migrations.

The solution could be to manually re-create a Database with a custom cqlsession but that's not ideal, as it'd require to potentially create 2 identical manual sessions (one for migrations and one for actuator).
Fortunately for spring-data-cassandra users with same migration keyspace as the spring-data one, we can reuse the latter one.
But then, the Database class logic is to check the keyspace status and create it/create tables, which in the case of an actuator feature is useless and delay our Spring app startup as this process has already been handled by the migration (considering migrations are done before initializing the actuator bean).

Do you have an idea ?

@patka
Copy link
Owner

patka commented Jan 13, 2023

Hey Rémi

sorry for the way too long delay. Let me look into this and get back to you.

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

No branches or pull requests

2 participants