acelyc111 commented on code in PR #1961: URL: https://github.com/apache/incubator-pegasus/pull/1961#discussion_r1541007342
########## src/server/pegasus_server_impl.cpp: ########## @@ -1758,14 +1758,22 @@ dsn::error_code pegasus_server_impl::start(int argc, char **argv) dsn::ERR_LOCAL_APP_FAILURE, "open app failed, unsupported data version {}", _pegasus_data_version); - // update last manual compact finish timestamp + uint64_t last_manual_compact_used_time = 0; + LOG_AND_RETURN_NOT_OK( Review Comment: When upgrade from old versions, ERR_OBJECT_NOT_FOUND will be returned, right? ########## src/server/pegasus_server_impl.cpp: ########## @@ -1758,14 +1758,22 @@ dsn::error_code pegasus_server_impl::start(int argc, char **argv) dsn::ERR_LOCAL_APP_FAILURE, "open app failed, unsupported data version {}", _pegasus_data_version); - // update last manual compact finish timestamp + uint64_t last_manual_compact_used_time = 0; + LOG_AND_RETURN_NOT_OK( + ERROR_PREFIX, + _meta_store->get_last_manual_compact_used_time(&last_manual_compact_used_time), + "last_manual_compact_used_time failed"); Review Comment: ```suggestion "get_last_manual_compact_used_time failed"); ``` ########## src/server/pegasus_server_impl.cpp: ########## @@ -3375,12 +3389,17 @@ uint64_t pegasus_server_impl::do_manual_compact(const rocksdb::CompactRangeOptio // update rocksdb statistics immediately update_replica_rocksdb_statistics(); - uint64_t last_manual_compact_finish_time = 0; - CHECK_OK_PREFIX( - _meta_store->get_last_manual_compact_finish_time(&last_manual_compact_finish_time)); return last_manual_compact_finish_time; } +void pegasus_server_impl::after_manual_compact(std::uint64_t starttime, uint64_t endtime) +{ + // store last manual compact used time to meta store for learn situation Review Comment: If the replica server shutdown before the replicas complete the manual compaction, can this patch resolve this issue? -- 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