You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2020/08/27 09:59:46 UTC

[GitHub] [incubator-pegasus] Shuo-Jia commented on a change in pull request #587: fix(pegasus-server): Load options from file when open an exist DB

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



##########
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(

Review comment:
       Why not use `get_value_from_meta_cf` directly?

##########
File path: src/server/pegasus_server_impl.cpp
##########
@@ -1375,6 +1414,7 @@ ::dsn::error_code pegasus_server_impl::start(int argc, char **argv)
         _meta_store->set_data_version(PEGASUS_DATA_VERSION_MAX);
         _meta_store->set_last_flushed_decree(0);
         _meta_store->set_last_manual_compact_finish_time(0);
+        _meta_store->set_usage_scenario(ROCKSDB_ENV_USAGE_SCENARIO_NORMAL);

Review comment:
       Defautly, the `get_envs` will show `null` result when using `shell`,  if here `set_usage_scenario(ROCKSDB_ENV_USAGE_SCENARIO_NORMAL)` at  first `start`, does that mean the `get_envs` will show `normal` after reopen when using `shell`?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org