|Subject||Re: [IB-Architect] Isolation level implemetation|
> >What does it mean run as "pre-committed", how can I start a transaction thatThe comment is source code ("jrd/tra.c") says:
> >don't affect the OAT in Interbase 6?
> I think the mechanism was not turned on for user transactions,
> but the garbage collect thread runs in that mode to avoid tying
> up the OAT. An ordinary snapshot reader must be recorded as
> active to preserve its view of the database. A read-committed
> transaction doesn't care about consistency - whatever is committed
> at the instant is OK - read the same record four times, see
> four version - hey, cool. So there's no reason to hold old
> versions around for read committed transactions.
> The implementation, if I remember, is to set the transaction state
> to committed on the TIP at start-up time. Works fine for readers,
> but it would not do at all for writers.
/* If the transaction is read-only and read committed, it can be
precommitted because it can't modify any records and doesn't
need a snapshot preserved. This is being enabled for internal
transactions used by the sweeper threads. This transaction type
can run forever without impacting garbage collection or causing
transaction bitmap growth. It can be turned on for external use
by removing the test for TDBB_sweeper. */
if (tdbb->tdbb_flags & TDBB_sweeper &&
trans->tra_flags & TRA_readonly &&
trans->tra_flags & TRA_read_committed)
So is it safe to remove test for TDBB_sweeper ?