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

application: syncfs on storage during startup #10495

Closed
wants to merge 1 commit into from

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented May 2, 2023

This depends on:

If Redpanda crashes during storage writes, there
may be non-persistent metadata left visible in
the filesystem.

To provide the guarantee that everything the storage layer sees on disk during recovery is persistent,
call syncfs during startup.

The strength of this guarantee depends on the underlying filesystem, as some filesystems may lie about persistence if there has previously been an I/O error on a device, by marking pages clean even though they were not
successfully flushed.

This does not help in all cases, but it is a cheap thing to do that may help us reason about storage
consistency issues across crash/restart cycles if
they are seen in the field.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.1.x
  • v22.3.x
  • v22.2.x

Release Notes

  • none

If Redpanda crashes during storage writes, there
may be non-persistent metadata left visible in
the filesystem.

To provide the guarantee that everything the storage
layer sees on disk during recovery is persistent,
call syncfs during startup.

The strength of this guarantee depends on the underlying
filesystem, as some filesystems may lie about persistence
if there has previously been an I/O error on a device,
by marking pages clean even though they were not
successfully flushed.

This does not help in all cases, but it is a cheap
thing to do that may help us reason about storage
consistency issues across crash/restart cycles if
they are seen in the field.
@jcsp jcsp added kind/enhance New feature or request area/storage labels May 2, 2023
@jcsp jcsp requested a review from mmaslankaprv May 2, 2023 12:17
@jcsp jcsp closed this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant