Skip to content
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

More robust filewriting #147

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

MathieuBordere
Copy link
Contributor

@MathieuBordere MathieuBordere commented Jun 24, 2021

There are some mentions of corrupted / empty cluster.yaml files. This PR should help prevent these cases.

  • Atomically replace files when writing by using the renameio package.
  • Protect against empty server list (if an empty list is ever even possible).

Fixes #145

Mathieu Borderé added 2 commits June 24, 2021 12:29
Signed-off-by: Mathieu Borderé <mathieu.bordere@canonical.com>
Signed-off-by: Mathieu Borderé <mathieu.bordere@canonical.com>
Copy link
Contributor

@freeekanayaka freeekanayaka left a comment

Choose a reason for hiding this comment

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

Looks good to me. Beware that adding a new dependency means having to update the Launchpad Debian package recipe (and import that new dependency in the repository).

@MathieuBordere
Copy link
Contributor Author

Looks good to me. Beware that adding a new dependency means having to update the Launchpad Debian package recipe (and import that new dependency in the repository).

Thanks for the heads up, I'll have a look.

@MathieuBordere
Copy link
Contributor Author

@freeekanayaka So I think I have to update the recipe here https://code.launchpad.net/~dqlite/+recipe/dqlite, but I don't really find where I can add the repository to the list of other repositories here https://code.launchpad.net/dqlite.

Thanks a lot if you could give me a pointer in the right direction.

@freeekanayaka
Copy link
Contributor

@freeekanayaka So I think I have to update the recipe here https://code.launchpad.net/~dqlite/+recipe/dqlite, but I don't really find where I can add the repository to the list of other repositories here https://code.launchpad.net/dqlite.

Thanks a lot if you could give me a pointer in the right direction.

You should be able to create a new import from GitHub using this link https://code.launchpad.net/+code-imports/+new

@stgraber stgraber merged commit eb26312 into canonical:master Jun 24, 2021
MathieuBordere pushed a commit to MathieuBordere/jepsen.dqlite that referenced this pull request Jun 24, 2021
tar isn't happy with the changes made in go-dqlite as part of
canonical/go-dqlite#147.
@MathieuBordere MathieuBordere deleted the more-robust-filewriting branch December 9, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cluster.yaml becomes empty / corrupted
3 participants