Skip to content

Conversation

lantiga
Copy link
Collaborator

@lantiga lantiga commented Oct 31, 2022

What does this PR do?

Currently the database component syncs to the drive on_exit, which will also be triggered in case of an exception. In order to further ensure that data is not lost in case of an unhandled crash, this PR introduces periodic sync'ing of the database with a set time interval.

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

cc @Borda

@github-actions github-actions bot added the app (removed) Generic label for Lightning App package label Oct 31, 2022
@lantiga lantiga force-pushed the db_periodic_syncing branch from 0f274f5 to 8c2491e Compare November 2, 2022 09:11
@lantiga lantiga force-pushed the db_periodic_syncing branch from e26bb49 to 61d2b0d Compare November 2, 2022 12:16
@Borda Borda added this to the v1.9 milestone Nov 2, 2022
@lantiga lantiga force-pushed the db_periodic_syncing branch from 8be9861 to 0840888 Compare November 3, 2022 12:52
@lantiga lantiga requested review from tchaton and awaelchli November 3, 2022 16:30
@awaelchli awaelchli added feature Is an improvement or enhancement app:storage labels Nov 3, 2022
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen if the sync process takes longer than the interval?

@mergify mergify bot added the ready PRs ready to be merged label Nov 3, 2022
@lantiga
Copy link
Collaborator Author

lantiga commented Nov 3, 2022

What will happen if the sync process takes longer than the interval?

The copy and the interval are sequential and all calls are blocking, so the interval indicates how much time will elapse before a new copy is performed.

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition !

@tchaton tchaton enabled auto-merge (squash) November 3, 2022 21:02
@tchaton tchaton merged commit 1696027 into master Nov 3, 2022
@tchaton tchaton deleted the db_periodic_syncing branch November 3, 2022 21:07
Borda pushed a commit that referenced this pull request Nov 5, 2022
lexierule pushed a commit that referenced this pull request Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app (removed) Generic label for Lightning App package feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants