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
Start to Refactor CassandraStorage #1294
Start to Refactor CassandraStorage #1294
Conversation
No linked issues found. Please add the corresponding issues in the pull request description. |
…usterDao, removing ClusterDao's dependancy on RepairRunDao.
…leDao for schedule prepared statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of requested changes to unblock testing.
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/RepairScheduleDao.java
Show resolved
Hide resolved
…CassandraStorage.java Ensure migrations completed before statement preparation. Co-authored-by: Alexander Dejanovski <alex.dejanovski@datastax.com>
…RepairScheduleDao.java Ensure ReairSchedule prepared statements are actually prepared. Co-authored-by: Alexander Dejanovski <alex.dejanovski@datastax.com>
2298d18
to
f9dd001
Compare
@adejanovski thanks for the input, the tests now pass. Can you please complete your review, and especially take a look at what I've done with the acceptance tests? I've removed all references to Cassandra 2.x to get things running, but maybe we can leave the cases where the cluster to be repaired is Cassandra 2.x, as long as the backend is 3.x+? I do note that the tests against trunk all seem to be failing, I'm not sure if that is a problem or not given that trunk is presumably often unstable (or API incompatible with Reaper perhaps? Not sure...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice refactorings!
There are some of the tests in the memory jobs that need to be re-introduced and a few comments that should be deleted.
Otherwise LGTM.
You can merge the PR once the above points have been addressed and CI passes.
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorage.java
Outdated
Show resolved
Hide resolved
All changes made as requested, with removal of |
This PR begins the refactoring process on CassandraStorage as discussed in #1265. The long term goals are:
core
.core
where possible and are neverResultSet
s (which are almost untyped and hard to work with).This PR is a very small step in that direction, and simply delegates many of the storage operations from CassandraStorage to DAO types.
Further steps need to be taken to reflect the broad cuts made here in the interfaces and in MemoryStorage, before creating smaller interfaces that the new DAO types adhere to and passing those interfaces (instead of e.g. the larger monolithic IStorage) to consumers.