-
Notifications
You must be signed in to change notification settings - Fork 218
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
Further storage refactoring #1306
Merged
Miles-Garnsey
merged 13 commits into
thelastpickle:master
from
Miles-Garnsey:refactor/repairrun-storage
Jun 19, 2023
Merged
Further storage refactoring #1306
Miles-Garnsey
merged 13 commits into
thelastpickle:master
from
Miles-Garnsey:refactor/repairrun-storage
Jun 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No linked issues found. Please add the corresponding issues in the pull request description. |
ca97fd5
to
46abfab
Compare
adejanovski
previously approved these changes
Jun 14, 2023
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.
Looks good 👍
I've left a few non blocking comments. Check them and let me know what you think.
src/server/src/main/java/io/cassandrareaper/storage/JsonParseUtils.java
Outdated
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/MemoryStorageFacade.java
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/CassandraStorageFacade.java
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cassandra/migrations/Migration025.java
Show resolved
Hide resolved
src/server/src/main/java/io/cassandrareaper/storage/cluster/MemClusterDao.java
Show resolved
Hide resolved
…t they are broken out of the monolithic storage structure.
…'t exist in the original IStorage.
…rface it ain't staying public (with 1-2 exceptions).
…s with where getClusterScheduleStatuses and getClusterRunStatuses should sit.
a956812
to
4f5d198
Compare
adejanovski
approved these changes
Jun 19, 2023
adejanovski
pushed a commit
that referenced
this pull request
Jun 22, 2023
* Further storage layer refactoring. Move memory storage and Cassandra storage implementations, and interfaces for DAOs into their own packages. * Make CassandraStorage and MemoryStorage facades which delegate their methods to the new DAOs. * Split IStorage interface out into several smaller interfaces.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR continues refactoring the storage classes. It breaks the MemoryStorage class out into delegated classes, turning MemoryStorage into MemoryStorageFacade. CassandraStorage is likewise renamed CassandraStorageFacade since most of its methods are now also delegates (there are some residual ones that we will deal with in the next round of refactoring).
The DAOs are now lined up on the domain model from
core
, with each sitting in its own package containing:IStorage has been substantially broken down and now extends a variety of smaller interfaces again adhering to the domain model from the
core
package.To preserve the existing semantics for callers, I have retained MemoryStorageFacade and CassandraStorageFacade, which we will attempt to now completely eliminate in the next round of refactoring. Several methods have been eliminated from these classes where they were only required internally within the DAO.
We also fix a bug where the implementation of
deleteRepairRun
differed between the memory and Cassandra implementations.Still to do:
resources
.