WHBANG commented on code in PR #1108:
URL: https://github.com/apache/incubator-pegasus/pull/1108#discussion_r944198301


##########
src/server/pegasus_server_impl.cpp:
##########
@@ -2634,6 +2635,10 @@ void pegasus_server_impl::update_usage_scenario(const 
std::map<std::string, std:
                            old_usage_scenario,
                            new_usage_scenario);
         }
+    } else {
+        // When an old db is opened and the conf is changed, the options 
related to usage scenario
+        // need to be recalculated with new values.
+        recalculate_data_cf_options(_tmp_data_cf_opts);

Review Comment:
   No, no matter what the last `usage scenario` is, it will change from 
'normal' to the corresponding mode, `usage_scenario == _usage_scenario`, so it 
will be executed once.
   here is a cyclic task, it will get the current `usage scenario`, in order to 
only execute once when the db is opened, so `is_need_update_data_cf_opts` 
variable is added to mark whether `recalculate_data_cf_options` has been called



-- 
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: dev-unsubscr...@pegasus.apache.org

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


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

Reply via email to