Skip to content

fsync instead of calling Write #276

@Crypt-iQ

Description

@Crypt-iQ

Write doesn't sync to disk so a crash can corrupt data. One example of this is here:

func (h *headerStore) appendRaw(header []byte) error {
if _, err := h.file.Write(header); err != nil {
return err
}
return nil
}

I forget if there are other call-sites

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions