tisonkun commented on code in PR #620:
URL: https://github.com/apache/incubator-kvrocks/pull/620#discussion_r889566487


##########
src/storage.cc:
##########
@@ -209,9 +210,16 @@ Status Storage::CreateColumnFamilies(const 
rocksdb::Options &options) {
     tmp_db->Close();
     delete tmp_db;
   }
-  // Open db would be failed if the column families have already exists,

Review Comment:
   Is it possible we check exact that it failed because of "already exists" 
instead of "NOT column families not opened"? I'm afraid there is still some 
edge case we miss.
   
   Also, shall we prefer C++ idiom and thus check strings with `<string>`? That 
means:
   
   * `s.ToString().rfind(notOpenedPrefix, 0) != 0`
   
   over
   
   * `!strncasecmp(s.ToString().c_str(), notOpenedPrefix.c_str(), 
notOpenedPrefix.size())`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to