How *exactly* does the file caching mechanism work?
jiva at devware.com
Thu May 28 08:58:53 GMT 1998
Today, a coworker of mine and I had a bit of a debate, and I was hoping
someone here could resolve the question. (Incidentally, Microsoft didn't
seem able to grasp what I was asking when I called them on this) Originally
the question came up out of a discussion about NT servers, but I suspect the
same mechanism works for Samba servers as well, or at least you all might be
more forthcoming with information than Microsoft was. (I swear, after 1.5
hours on hold (no exaggeration) I was told no one knew.)
We're a software company, we write a database application that uses foxpro
format databases stored on a shared network drive to store our data. These
files are shared between multiple workstations running Windows95. The
workstations all open the files at the same time, read/write, and perform
record level operations on the files.
The question is, if you have two workstations that open the same file on the
server, A and B, if Workstation A were to lock a record, and write data to
that record, then unlock the record, then if workstation B were to read from
that record, would there be any sort of difference between the data? Orr,
is the write cache essentially the same data as the read cache?
What I mean is, the question arises out of the following situation: When you
have caching enabled on the workstations, there might be a delay between the
time that the committed data is written and the time that it is actually
*committed* to the network drive. This can cause a delay, if I were to try
to read that data from the fileserver, in when I would actually be able to
read the data written. If all caching is *disabled* on the Win95 machine,
would the NT server cache result in a similar delay?
The main reason the question came up is because we have experienced data
corruption in situations where the 95 client machines didn't have caching
disabled. As a result, we have required that everyone disable caching on
the server as well, but I don't think this is really needed.
Thanks in advance
More information about the samba-technical