# HG changeset patch # User RhodeCode Admin # Date 2024-06-10 15:01:58 # Node ID 35680f5159b0c85ca46b1e20540822c307ca9f97 # Parent f0acf3f632fd7ffc2d9e3afc22b051b386fa8aad archive-cache: synced with ce diff --git a/vcsserver/lib/rc_cache/archive_cache/fanout_cache.py b/vcsserver/lib/rc_cache/archive_cache/fanout_cache.py --- a/vcsserver/lib/rc_cache/archive_cache/fanout_cache.py +++ b/vcsserver/lib/rc_cache/archive_cache/fanout_cache.py @@ -138,6 +138,13 @@ class FileSystemCache: for chunk in iterator: size += len(chunk) writer.write(chunk) + writer.flush() + # Get the file descriptor + fd = writer.fileno() + + # Sync the file descriptor to disk, helps with NFS cases... + os.fsync(fd) + log.debug('written new archive cache under %s', full_path) return size def _get_keyfile(self, key):