-
Notifications
You must be signed in to change notification settings - Fork 504
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
The storage engine type awareness in Kvrocks #1973
Conversation
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.
LGTM, thank you!
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.
BTW, I think we can have an enum type in our code.
Under the namespace Then we can have macros for storage engine as following, Then we can determine the engine type as following, Would that be ideal? |
Firstly, the enum type can definitely have a better name than Besides, we can have a static-storage-duration constant to wrap the macro, so that we don't need to do any type cast. |
|
Thank you for your contribution! |
#1966
Storage Engine Type Enum
enum class StorageEngineType : uint16_t { RocksDB, Speedb, };
Storage type stored in variable STORAGE_ENGINE_TYPE in
src/storage.h
. it can beStorageEngineType::RocksDB
orStorageEngineType::Speedb