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

Do some best-effort cleanup in file backend #4684

Merged
merged 2 commits into from
Jun 4, 2018
Merged

Commits on Jun 2, 2018

  1. Do some best-effort cleanup in file backend

    If put results in an encoding error and after the file is closed we
    detect it's zero bytes, it could be caused by an out of space error on
    the disk since file info is often stored in filesystem metadata with
    reserved space. This tries to detect that scenario and perform
    best-effort cleanup. We only do this on zero length files to ensure that
    if an encode fails to write but the system hasn't already performed
    truncation, we leave the existing data alone.
    
    Vault should never write a zero-byte file (as opposed to a zero-byte
    value in the encoded JSON) so if this case is hit it's always an error.
    jefferai committed Jun 2, 2018
    Configuration menu
    Copy the full SHA
    75fb75f View commit details
    Browse the repository at this point in the history
  2. Also run a check on Get

    jefferai committed Jun 2, 2018
    Configuration menu
    Copy the full SHA
    74ae12e View commit details
    Browse the repository at this point in the history