hycdong commented on a change in pull request #587:
URL: https://github.com/apache/incubator-pegasus/pull/587#discussion_r478290427



##########
File path: src/server/meta_store.cpp
##########
@@ -52,38 +52,64 @@ uint64_t meta_store::get_last_manual_compact_finish_time() 
const
 uint64_t meta_store::get_decree_from_readonly_db(rocksdb::DB *db,
                                                  rocksdb::ColumnFamilyHandle 
*meta_cf) const
 {
+    std::string str_last_flushed_decree;
     uint64_t last_flushed_decree = 0;
-    auto ec = get_value_from_meta_cf(db, meta_cf, true, LAST_FLUSHED_DECREE, 
&last_flushed_decree);
+    auto ec = get_string_value_from_meta_cf(
+        db, meta_cf, true, LAST_FLUSHED_DECREE, &str_last_flushed_decree);
     dcheck_eq_replica(::dsn::ERR_OK, ec);
+    dassert_f(dsn::buf2uint64(str_last_flushed_decree, last_flushed_decree),

Review comment:
       I suggest using `dassert_replica` instead.

##########
File path: src/server/pegasus_server_impl.cpp
##########
@@ -1360,6 +1398,7 @@ ::dsn::error_code pegasus_server_impl::start(int argc, 
char **argv)
     if (db_exist) {
         _last_committed_decree = _meta_store->get_last_flushed_decree();
         _pegasus_data_version = _meta_store->get_data_version();
+        _usage_scenario = _meta_store->get_usage_scenario();

Review comment:
       I think it will cause core while rolling_update server. The table 
created before won't have `usage_scenario` in meta column family, while rolling 
update, the `db_exist` is true, it will assert on Line72 in function 
`get_usage_scenario`




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to