Introduce checkpoint schedule module
This is a very simple module that incorporates the logic for calculating the time of the next scheduled checkpoint given the configured interval between checkpoints. It doesn't have any dependencies, which allows to cover it with a unit test. It will be used by the checkpoint daemon once we rewrite it in C. Rationale: in future we might want to introduce more complex rules for scheduling checkpoints (cron-like may be) and it will be really nice to have this logic neatly separated and tested.
Showing
- src/box/CMakeLists.txt 1 addition, 0 deletionssrc/box/CMakeLists.txt
- src/box/checkpoint_schedule.c 76 additions, 0 deletionssrc/box/checkpoint_schedule.c
- src/box/checkpoint_schedule.h 85 additions, 0 deletionssrc/box/checkpoint_schedule.h
- test/unit/CMakeLists.txt 6 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/checkpoint_schedule.c 96 additions, 0 deletionstest/unit/checkpoint_schedule.c
- test/unit/checkpoint_schedule.result 41 additions, 0 deletionstest/unit/checkpoint_schedule.result
src/box/checkpoint_schedule.c
0 → 100644
src/box/checkpoint_schedule.h
0 → 100644
test/unit/checkpoint_schedule.c
0 → 100644
test/unit/checkpoint_schedule.result
0 → 100644
Please register or sign in to comment