Skip to content

Commit

Permalink
Make sure files are durable that should be in snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansuarez committed Mar 12, 2024
1 parent 50b94c9 commit 1731413
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stable/database/files/backup_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def write_file(path, content):
else:
json.dump(content, f)

# Flush buffers and invoke fsync() to make sure data is written to disk
f.flush()
os.fsync(f.fileno())

# Make sure that file is accessible by nuodb user, which has uid 1000 by
# default. Making the file group-writable ensures that it is accessible to
# the nuodb user in OpenShift deployments where an arbitrary uid is used
Expand Down

0 comments on commit 1731413

Please sign in to comment.