home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!destroyer!fmsrl7!eccdb1.pms.ford.com!vscarafi
- From: vscarafi@eccdb1.pms.ford.com (Vincent F. Scarafino)
- Subject: Re: SMARTDRV for Windows 3.1
- Message-ID: <Bt6Mrn.1rx@fmsrl7.srl.ford.com>
- Originator: news@pms001
- Sender: usenet@fmsrl7.srl.ford.com (0000-Admin(0000))
- Organization: Ford Motor Co.
- References: <1992Aug17.121720.16873W@lumina.edb.tih.no>
- Date: Tue, 18 Aug 1992 13:57:19 GMT
- Lines: 44
-
- ketil@edb.tih.no (Ketil Albertsen,TIH) writes:
- > In article <BszDLM.G8u@fmsrl7.srl.ford.com>, vscarafi@eccdb1.pms.ford.com (Vincent F. Scarafino) writes:
- >
- > >Programs that do proper transaction support *require* the assurance that at
- > >least a minimal amount of data be safely written to a log (in such a way as
- > >to survive the loss of power) *before* they can acknowledge to the application
- > >that a transaction has been committed. Otherwise there is an integrity problem.
- > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- > Well, isn't that a little pessimistic? A rollback is not an integrity problem,
- > it is next to "normal" in DBMSs - at least you should be prepared for it. And
- > you can make a perfectly consistent system with no integrity probles even if
- > you have no guarantee that "at least a minimal amount of data" is written
- > safely to disk. The last data you write to the log is the commit record, and
- > if after a power loss you don't find a complete commit record in the log (you
- > may end the record with a checksum to verify that it is complete), then you
- > have a rollback condition. If you find a commit record, it might be the case
- > that the user was not informed about the successful commit before power went
- > off, but he did request a commit and thereby gave up his right to do a
- > rollback. So the DBMS should insist that everything is consistent (which it is!).
- >
- > The only thing you require is that when the disk system reports that the
- > entire data record has been written successfully to disk, then it *is* written
- > successfully to disk. If a power loss occurs before this report is given, then
- > it is not written successfully to disk, and everything is still consistent,
- > although in the state of the database prior to transaction start. (Rollback)
-
- But with cached writes, these things happen asynchronously, so you have no
- guarantee that they'll make it to the disk in total, or in any kind of order
- that resembles the order they were written in. It is possible to have info
- on the disk that reflects the partial update of multiple transactions, all
- in different phases of update and non complete. There is no consistent point
- of reference.
-
- > A "nice" DBMS may after power up pick up the incomplete transaction and ask
- > if the user wishes a redo attempt, up to the point of the last successfully
- > written log record (again, checksumming may be used to verify that the log
- > record is indeed successfully written in its entirety). But this is not
- > required for consistency, and all redoing is under the full integrity
- > constraints mechanisms of the DBMS.
-
- These designs assume the knowledge of completed, consistent writes, and that
- cannot be guaranteed with cached writes.
-
- Vince
-