Skip to content

Commit 357a992

Browse files
author
zhoutongxi
committed
fix: follow reviewer's advice
1 parent 60ad570 commit 357a992

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/server/pegasus_server_impl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,11 @@ void pegasus_server_impl::update_app_envs_before_open_db(
27502750
update_rocksdb_iteration_threshold(envs);
27512751
update_validate_partition_hash(envs);
27522752
update_user_specified_compaction(envs);
2753-
if(_db){
2753+
2754+
// When backup cluster creates an app via duplication, if source app has env parameters about manual compact,
2755+
// incomplete replicas may start a manual compact. However, these replicas haven't opened rocksdb successfully yet,
2756+
// so we need to check if _db exists before starting manual compact to avoid coredump.
2757+
if (_db != nullptr) {
27542758
_manual_compact_svc.start_manual_compact_if_needed(envs);
27552759
}
27562760
set_rocksdb_options_before_creating(envs);

0 commit comments

Comments
 (0)