You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "ninsmiracle (via GitHub)" <gi...@apache.org> on 2023/07/05 03:03:27 UTC

[GitHub] [incubator-pegasus] ninsmiracle commented on pull request #1556: fix: some replicas never start manaul compact after zero o'clock

ninsmiracle commented on PR #1556:
URL: https://github.com/apache/incubator-pegasus/pull/1556#issuecomment-1620949653

   > Member
     This is exactly the problem. In `pegasus_manual_compact_service::start_manual_compact_if_needed()`, it need to use `check_periodic_compact()` to judge the trigger_time. There are some small problems in the calculation of trigger_time time in this way. As the following code see,the preset hhmm time needs to add unix_sec_today_midnight. 
   `inline int64_t hh_mm_today_to_unix_sec(string_view hhmm_of_day)
   {
       int sec_of_day = hh_mm_to_seconds(hhmm_of_day);
       if (sec_of_day == -1) {
           return -1;
       }
   
       return get_unix_sec_today_midnight() + sec_of_day;
   }`
   
     If the running time of this function is greater than 0 o'clock, trigger_time will be counted to the next day of the expect day. 
     In my opinion, even if `replica::on_config_sync works`  run as our expection, if there are manual_compact tasks have to across 0 o'clock, some replicas will not be able to get `compact_rule` through `check_periodic_compact()` function. In this way, once the task was discarded ,after pop from the task queue before 0 o'clock, it will not enter the task queue again.
   


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