Subject | Re: Embedded Firebird : Transaction |
---|---|
Author | Adam |
Post date | 2005-09-22T00:11:37Z |
Hi Ann,
best of both worlds approach, allowing the transaction to end
immediately but hopefully it will be cleaned up by the GC thread
rather than delaying the innocent transaction.
Undo logs are
(relatively rare) case of failure." Isn't a hard disconnection etc the
only case where roll back logs can't be processed?
doing it in the first place.
Adam
> Right. There's been a long split in opinion among InterBase andhad
> Firebird developers over the "fairness" of the garbage collection
> mechanism, especially with regard to transactions that roll back. In
> the original implementation, when a transaction rolled back, it changed
> its state on the TIP page and went away, leaving whatever changes it
> made to be cleaned up by the next transaction that happened to try toAgreed, I suppose the dedicated GC thread in the SS model could be a
> read the records.
>
> That was "unfair" to the innocent transaction, but it avoided the need
> to maintain a rollback segment/log/journal/whatever.
best of both worlds approach, allowing the transaction to end
immediately but hopefully it will be cleaned up by the GC thread
rather than delaying the innocent transaction.
Undo logs are
> necessary for multi-record operations that must be atomic under the SQLprocedures.
> rules: mass inserts, updates, deletes, triggers, and stored
> Since the mechanism existed, Borland decided in the interest ofShould this not be "... to avoid cooperative cleanup in all but the
> "fairness" that every transaction should carry an undo log and, if
> possible, undo its own changes on failure. They chose to burden every
> transaction with the potential of significant memory usage to avoid
> cooperative cleanup in the (relatively rare) case of failure.
(relatively rare) case of failure." Isn't a hard disconnection etc the
only case where roll back logs can't be processed?
>LOL, any rollback operation is going to be less efficient than not
> The predictable result was that gbak could not longer restore large
> databases, so they added a special transaction option for gbak that
> turned off the undo log, and probably at the same time, caused a normal
> transaction to release its undo log after it got to some size.
>
> >
> > But if I read this correctly, even if you were to insert 10 million
> > records in a single transaction, Firebird would release on the
> > transaction savepoint log.
>
> [Considerable grumbling about the efficiency of building up a large
> in-memory structure then dropping it has been suppressed]
>
doing it in the first place.
> >Ouch :)
> > Out of curiousity, does the client application have to wait around
> > while the 10000 to 1000000 changes are undone?
>
> Yes.
Adam