Re: data written to file missed by reader




seanmkirkpatrick@xxxxxxxxx wrote:

We currently run processes that communicate by writing an encoded
message to a flat file while other processes are reading the file. A
message that was written to the file by one process (fsync is not
called after each write) was missed by the reader. A second message
was written 1 ms later. When I say "missed", I mean that the process
read the second message and continued processing. Another process
reading messages from the same file came through ~200 ms later and read
the missed message and then the second message in the expected
sequence. Is there some kind of synchronization issue after the data
has been written that could have caused the reading process to miss the
data? Perhaps during the flush to disk? Is there any inter-process
file access management performed in the virtual layer?

How do readers detect that there is new data in the file? Do they check
for a change in the modification time and then re-read the file? Or is
new data appended to the file and they periodically try to read past
what was previously the end of the file?

My bet is that there is a flaw in your scheme for detecting new
messages. But it's hard to say without knowing in much more detail how
your scheme actually works.

DS

.



Relevant Pages

  • data written to file missed by reader
    ... message to a flat file while other processes are reading the file. ... read the second message and continued processing. ... and SCSI disks in a RAID 1 configuration. ...
    (comp.os.linux.development.system)
  • Re: Rambling: the info (+ experiment on reader reaction)
    ... and I think reader 5 might be right. ... I'm still reading. ... exaggerated rumour about the Fire tribe, Dahrahn thought, amazed. ...
    (rec.arts.sf.composition)
  • Wonder Woman and the Soft Reboot
    ... Gail Simone is a good writer, and her issues of Wonder Woman are, so ... where the Amazons live for thousands of years in such ... reading about. ... it fits and what the author intends by it, how she wants the reader to ...
    (rec.arts.comics.dc.universe)
  • Re: Which book sounds most compelling?
    ... author's political slant displeases me enough to outweigh the pleasure ... I get from his or her writing, I stop reading that author. ... My own choice generally involves keeping my own opinions more or less non-explicit, and expecting the reader to make up their own mind. ... feelings should not have been hurt. ...
    (rec.arts.sf.composition)
  • Re: Payoff (was: The mountain has moved)
    ... > mediocre plot and characters because the setting is so damn interesting. ... This is something I've wondered about as both a reader and a writer. ... asking her how a book was that she was reading. ...
    (rec.arts.sf.composition)