git-hulk commented on code in PR #620:
URL: https://github.com/apache/incubator-kvrocks/pull/620#discussion_r889581045
##########
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.
Yes, it's a bit tricky and confuse, but we can't change the status message
AFAIK since it returned by the RocksDB.
For the second suggestion, We do prefer C++ idiom. my initial intention was
to ignore the case when comparing the prefix. But seems this's unnecessary
since it can't protect anything if the status message is modified, I will
change to `find` to simplify the expression.
--
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]