﻿# Account for attribute caching when publishing model files

Separate NFS attribute synchronization from data-cache and revision selection; a forced statx refresh does not make multi-file publication atomic.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-storage-nfs-attribute-cache/
Language: en

A publisher changes a manifest on NFS, but a worker's metadata check still reports the old size. Attribute caching is one possible explanation, separate from cached file data and application-level revision selection. Identify which observation the worker made before disabling caches across the mount or assuming that a metadata refresh atomically updates every shard in a model package.

## Preserve the observation type

Record whether the worker looked up a pathname, requested attributes, opened a file or read contents through an existing descriptor. Those operations cross different cache boundaries. Keep server, mount and protocol context with the result. A stale application object retained in memory is not repaired merely because a diagnostic tool performs a new server-side metadata request for the same textual path.

## Read attribute policy precisely

Linux NFS documentation describes cached attributes and their role in checking file-data coherence. Attribute cache controls and close-to-open behavior have distinct documented scopes. A longer-lived open and a new opener need not observe changes identically. Do not equate one mount option with a universal promise that every client instantly sees every writer's update at the exact publication moment.

## Use explicit metadata synchronization

Statx provides flags distinguishing filesystem-default behavior, forced attribute synchronization with the server and cached information where possible. Preserve the chosen flag and returned field mask. Forced synchronization answers an attribute question; it is not an instruction to purge every data cache or create a transaction spanning several files. It can also introduce network work or related writeback under the documented filesystem behavior.

## Preserve a revision boundary

Prefer accepted immutable revision identities for the complete model set instead of using a mutable size or timestamp as proof of package readiness. A writer updating files concurrently can expose a logically mixed set even when every individual attribute is fresh. Coordinate publication and reader selection separately. The useful question is which complete revision the worker accepted, not simply whether one metadata query contacted the server.

## Verify the actual consumer

In an isolated equivalent, compare the worker's real operation sequence with explicit metadata diagnostics after a controlled publication. Retain attribute values, contents, selected revision and timing separately. A useful result explains the cache boundary and accepted data. It does not establish authorization, artifact integrity or global coherence from a fresh stat result, and it does not justify broad cache disabling without a demonstrated requirement.

## Primary references

[Linux NFS Mount Recovery and Coherence](https://man7.org/linux/man-pages/man5/nfs.5.html).

[Linux File-Specific Direct I/O Alignment](https://man7.org/linux/man-pages/man2/statx.2.html).

[IETF NFS Version Four Minor Version One Protocol](https://www.rfc-editor.org/rfc/rfc8881.html).

Related reading: [Choose vLLM safetensors loading strategies for local disks and NFS](/journal/vllm-safetensors-load-strategy/); [Keep tokenizer vocabulary, special tokens and chat templates in one release](/journal/tokenizer-artifact-release-manifest/).
