ninsmiracle opened a new pull request, #1565:
URL: https://github.com/apache/incubator-pegasus/pull/1565
### What problem does this PR solve? <!--add issue link with summary if
exists-->
#1564
### What is changed and how does it work?
My modifications mainly focus on
`pegasus_manual_compact_service::check_periodic_compact`. When the user sets
`MANUAL_COMPACT_PERIODIC_TRIGGER_TIME_KEY` for the first time in `app_envs`,
the midnight of the date on which the time is set is recorded.
If the user sets the trigger time to 02:00 and the current time is 15:00,
they want to perform manual_compact again at 02:00 the next day.
`_manual_compact_first_day_s.load() == cur_day_midnight && t_ms < now`
effectively restricts manual_compact on the same day for the user.
However, if the user sets the trigger time to 16:00 and the current time
is still 15:00, it is obvious that the user wants to do manual_compact at 16:00
on the same day. The `_time_natural_increase` member variable resolves this
situation by indicating that the time has naturally progressed under the
current logic, rather than comparing it with the initial
`MANUAL_COMPACT_PERIODIC_TRIGGER_TIME_KEY` setting.
Lastly, if the user deletes the `MANUAL_COMPACT_PERIODIC_TRIGGER_TIME_KEY`
parameter and then sets it again, it will be treated as the first-time setting.
### Checklist <!--REMOVE the items that are not applicable-->
##### Tests <!-- At least one of them must be included. -->
- Unit test
- Cluster test
--
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]