ninsmiracle commented on code in PR #1651:
URL:
https://github.com/apache/incubator-pegasus/pull/1651#discussion_r1365428982
##########
src/server/pegasus_server_impl.cpp:
##########
@@ -3166,6 +3171,19 @@ void pegasus_server_impl::reset_usage_scenario_options(
target_opts->max_write_buffer_number = base_opts.max_write_buffer_number;
}
+void pegasus_server_impl::reset_allow_ingest_behind_option(
+ const rocksdb::DBOptions &base_db_opt,
+ rocksdb::DBOptions *target_db_opt,
+ const std::map<std::string, std::string> &envs)
+{
+ if (envs.empty()) {
+ // for reopen db during load balance learning
+ target_db_opt->allow_ingest_behind = base_db_opt.allow_ingest_behind;
+ } else {
+ target_db_opt->allow_ingest_behind = parse_allow_ingest_behind(envs);
+ }
Review Comment:
When I read this snippet of code, I believe that all the `db_option`
settings should be copied to the new database after reopening it. This is
because, in my view, we reopen the db only when replicas are learning. I
expect that the RocksDB option for the learner should total similar with
learnee's.
However, the current logic only deals with the `allow_ingest_behind`
parameter, and I'm not entirely certain if this is a specialized design for a
particular feature. As we all know, "learn" is a vital component of Pegasus,
upon which several significant features are based.
So I only copied this parameter to new replica's `db_option`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]