From: Francisco R. <rev...@im...> - 2005-06-18 03:18:10
|
On Fri, Jun 17, 2005 at 10:31:19PM -0400, Bill Burke wrote: > > > Francisco Reverbel wrote: > > >The meaning of "clear a transaction in the log" depends on whether > >the transaction is distributed or not. If it is a distributed > >transaction (either an imported transaction or a locally-started > >transaction that uses some remote resource), then it means writing > >a "tx end" record to the log. If it is a locally-started transaction > >that uses no remote resource (only XA resources), then it means > >telling the tx logging module that the log file containing the "tx > >commit" record can be erased as far as the transaction is concerned. > >No "tx end" record is written out to the log in this case. (I inherited > >this behavior from Bill's prototype, which never writes out "tx end" > >records.) > > > > Feel free to ditch the old prototype entirely. I won't be upset or > insulted. I do think the Writer could be reused though. It is just a > BatchFileWRiter and can write any number of bytes. The "tx end" record > could be written, just don't have the sender wait for the response. Yes, I understand that. What I said about inheriting a beheviour from your prototype might have sounded like a complaint. It was not! I have *choosen* to retain that behaviour because I think that it may be a good tradeoff. No "tx end" records mean less work during normal operation, at the cost of more work at recovery time. (That this is a good thing is just a guess, of course, as I have measured neither the actual overhead of writing "tx end" records to the log, nor the downtime increase caused by the additional work at recovery time.) In the case of a distributed transaction, I found no way of avoiding the "tx end" record. Remote resources do not take recover calls, like XA resources do. At recovery time you need the "tx end" records to distinguish the completed transactions from the pending ones. Regards, Francisco |