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