New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve snapshot scheduling interface #1590
Comments
Hi @romange , Thank you! |
Hi @eliskovets,
Currently you can either save a snapshot explicitly via Probably the best way would be to trigger it explicitly each time a client writes the data to the server. Moreover, is there a specific reason why you would like snapshotting on write trigger? |
I agree with @kostasrim here. It's a very narrow use case and it requires from us some additional tracking and wiring to implement. Seems that calling BGSAVE/SAVE is an adequate solution for this problem. |
Requested by dragonflydb#1590. Introducing a new flag `--snapshot_cron`, which enables users to use cron expressions to time snapshot saves. Signed-off-by: Dor Avrahami <da19965@gmail.com>
Requested by dragonflydb#1590. Introducing a new flag `--snapshot_cron`, which enables users to use cron expressions to time snapshot saves. Signed-off-by: Dor Avrahami <da19965@gmail.com>
Requested by dragonflydb#1590. Introducing a new flag `--snapshot_cron`, which enables users to use cron expressions to time snapshot saves. Signed-off-by: Dor Avrahami <da19965@gmail.com>
@romange This can be marked as closed now. |
That was quick 😀. Thank you! |
I would like to apply some changes. |
What are the changes? |
@dor132 I see you already saw - I think your proposal is good. |
Introducing a new flag --snapshot_cron, enabling users to use cronjob expressions to time snapshot saves. Cronjob expressions are parsed using a third party library croncpp. This PR continues dragonflydb#1599, updating cron expressions to crontab style, up to minutes resolution instead of seconds. Signed-off-by: Dor Avrahami <da19965@gmail.com>
Requested by #1590. Introducing a new flag --snapshot_cron, enabling users to use cronjob expressions to time snapshot saves. Cronjob expressions are parsed using a third party library croncpp. This PR continues #1599, updating cron expressions to crontab style, up to minutes resolution instead of seconds. Signed-off-by: Dor Avrahami <da19965@gmail.com>
save_schedule
flag is a bit confusing and not flexible enough.Instead, we should introduce a more standard way of scheduling snapshots like cronjob expression.
this library can help with parsing and matching the events.
https://github.com/mariusbancila/croncpp
we should introduce a new flag (e.g.
snapshot_cron
?) and leave the old one to allow an easy transition before we deprecate it.The text was updated successfully, but these errors were encountered: