Subject Re: Nested Transactions (found example)
Author tigereye_philip
Alexander,

While committing some code to CVS tonight I realized I had a splendid
example of sub-transactions right in front of me. Every once in a
while I'll have quite a few files checked out of CVS, locally
modified. I'll find I've made useless changes which I don't want to
commit back to the repository, because they're trivial. (As I usually
work on a Borland C++ Builder project, .dfm files very often get
trivially changed by developpers moving the form around to fit their
screen resolution. On other days, I just realize I'm being a moron
and take appropriate action.)

So my solution is to get a "clean copy" of just that one file (or set
of files.) I don't rollback my entire sandbox (I may be an idiot, but
there's some hard work I want to keep,) and I don't manually undo my
changes by applying reversal changes. I effectively rollback changes
to some files, but not others. I think that illustrates sub-
transactions, in a sense. (In-as-much as CVS is any sort of rigorous
transactional system, which it's usually not.) I was working on all
of them more-or-less simultaneously. Later, I'll wish to commit all
of these changes (generally) together -- changing just a .h file
without the .cpp file will likely irritate someone, somewhere. That'd
be equivalent to committing a top-level transaction.

Am I making some sort of sense? Thoughts? (I have a feeling the CVS
example is actually closer to the split/join semantics: you can do a
final top-level commit on a subset of the entire sandbox, etc.)

I've been keeping notes on this sort of thing here, if you care to
see how the above fits into my more general musings on
transaction/database theory.
http://www.pseudotheos.com/view_object.php?object_id=952

[replying from yahoo-groups directly, thus the different sender name.]

-Philip

--- In firebird-support@yahoogroups.com, "Alexander V.Nevsky"
> Sorry, but in this sense I don't understand why do you need
> _sub_transactions. This is exactly the way of usage of transactions.
>
> Best regards,
> Alexander.