[OpenAFS] Cache Consistency problem
Craig_Everhart@transarc.com
Craig_Everhart@transarc.com
Thu, 19 Dec 2002 10:46:12 -0500 (EST)
Excerpts from transarc.external.openafs: 17-Dec-02 Re: [OpenAFS] Cache Co=
nsist.. Paul Blackburn@est.ibm.c (5759*)
Ka=F0an Co=FEkun wrote:
> Hi All,
>
> We are having some cache consistency problems. Sometimes the afs =
> client on our web server does not represent the actual files on the =
> some volumes. That is when someone uploads a new file to his directory =
> the file is not noticed on the client side. The volume is a read/write =
> volume. And the problem can be overcomed by creating a file on the =
> volume using the client and also flush commands work too.
AFS (and OpenAFS) provides open/close consistency, not read/write consist=
ency. After a file is written and closed, a new open() on any client wil=
l see the fresh data. The mechanism in use here is the callback that Pau=
l Blackburn mentioned. The problem is likely that the web server is cach=
ing the opens on the files that it is serving, so it is not seeing (servi=
ng) the fresh data. If the web server shares a client cache with the upd=
ater, they both will see the same data, as you noticed. So basically the=
web server is keeping a cache of open files that is overriding the usual=
AFS mechanism for automatically noticing the fresh data. By contrast, D=
CE/DFS provides read/write consistency, so after a write() completes, a r=
ead() on any client retrieves fresh data.
Craig