You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "MaheshMadushan (via GitHub)" <gi...@apache.org> on 2024/01/01 05:17:41 UTC

Re: [PR] The storage engine type awareness in Kvrocks [kvrocks]

MaheshMadushan commented on PR #1973:
URL: https://github.com/apache/kvrocks/pull/1973#issuecomment-1873160932

   > BTW, I think we can have an enum type in our code.
   
   Under the namespace `engine` in `src/storage.h` following enum can be created.
   `enum class Type {
     RocksDB,
     Speedb,
   };
   `
   
   Then we can have macros for storage engine as following,
   `STORAGE_ENGINE=0 # for rocksdb`
   `STORAGE_ENGINE=1 # for speedb`
   
   Then we can determine the engine type as following,
   `if (STORAGE_ENGINE == static_cast<int>(engine::Type::RocksDB)) {} ...`
   
   Would that be ideal?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org