You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "empiredan (via GitHub)" <gi...@apache.org> on 2026/03/17 09:18:45 UTC

Re: [PR] fix: check if db exists in update_app_envs_before_open_db when starting a replica [incubator-pegasus]

empiredan commented on code in PR #2374:
URL: https://github.com/apache/incubator-pegasus/pull/2374#discussion_r2945391269


##########
src/server/pegasus_server_impl.cpp:
##########
@@ -2750,7 +2750,9 @@ void pegasus_server_impl::update_app_envs_before_open_db(
     update_rocksdb_iteration_threshold(envs);
     update_validate_partition_hash(envs);
     update_user_specified_compaction(envs);
-    _manual_compact_svc.start_manual_compact_if_needed(envs);
+    if(_db){

Review Comment:
   As pointed out by @acelyc111-bot , the code style here does not look correct. For some reason, the code style lint did not run, and neither the build nor unit test workflows were triggered. Please fix the code style and resubmit the changes so we can see whether the CI runs properly this time.
   
   Also, please add some comments here to explain that the reason for checking `_db != nullptr` is that performing a manual compaction on a follower table that is not yet ready for duplication may lead to a segmentation fault.
   
   ```suggestion
       if (_db != nullptr) {
   ```



-- 
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-unsubscribe@pegasus.apache.org

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