ninsmiracle commented on code in PR #1651:
URL: 
https://github.com/apache/incubator-pegasus/pull/1651#discussion_r1365352027


##########
src/server/pegasus_server_impl.cpp:
##########
@@ -1667,7 +1667,18 @@ dsn::error_code pegasus_server_impl::start(int argc, 
char **argv)
             // only be initialized with default values when calling 
'LoadLatestOptions', see
             // 'rocksdb/utilities/options_util.h'.
             reset_rocksdb_options(loaded_data_cf_opts, &_table_data_cf_opts);
-            _db_opts.allow_ingest_behind = parse_allow_ingest_behind(envs);
+
+            // here loaded_db_opt should be read success
+            if (envs.size() == 0) {
+                // for reopen db during load balance learning
+                _db_opts.allow_ingest_behind = 
loaded_db_opt.allow_ingest_behind;
+                LOG_INFO_PREFIX("reopen replica,last_allow_ingest_behind = {}",
+                                loaded_db_opt.allow_ingest_behind);
+            } else {
+                _db_opts.allow_ingest_behind = parse_allow_ingest_behind(envs);

Review Comment:
   I refactor these codes to reset_rocksdb_options now.



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

Reply via email to