Newsgroups: news.software.b
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Duplicate articles from B news site - would C news help ??
Message-ID: <1990Dec7.195031.7779@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1990Nov22.175142.18296@zoo.toronto.edu> <andy.659499523@xwkg> <16070@bfmny0.BFM.COM> <113417@uunet.UU.NET>
Date: Fri, 7 Dec 90 19:50:31 GMT

In article <113417@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes:
>The second problem is that dbz uses stdio rather than read/write.
>Stdio writes full buffers, not just the data you're interested in.
>B news runs many copies of inews/rnews -U, while C news runs one
>inews/rnews -U with the history buffer in core, so no one trips over
>each other.

However, dbm also writes full buffers (its own buffers, not stdio's).
I'm still rather puzzled as to why there was such a dramatic difference
in behavior.  Different usage patterns, maybe.  But in general...

Neither dbm nor any version of dbz was ever designed to be written by
multiple customers at once, or to be read while being written.  Having
only one process at a time working on the database is not a random
quirk of C News:  it is an absolute requirement if you want to be sure
of a complete and consistent database.  Software that writes dbm/dbz
databases without proper locking is asking for disaster.

Altering dbz to use read/write rather than stdio seems to reduce the
frequency of difficulties, but it does not make the problem go away.
-- 
"The average pointer, statistically,    |Henry Spencer at U of Toronto Zoology
points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu   utzoo!henry
