Login | Register
My pages Projects Community openCollabNet
Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

Reply to message

2020-04-07: This site is going to be decommissioned and shut down on 2020-07-01. Please copy and archive any data you wish to keep before that date.

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author theslack
Full name Jack Neely
Date 2006-09-06 06:39:39 PDT
Message The mailing lists please? Mostly because folks out here know more SQL than I.

That entire code path is done in one commit so that if we encounter a
file system error (out of space, permissions, whatever) we can
rollback to the last known good state. Otherwise, the database is
possibly corrupt. So however the database code works, that needs to
be the final result.

My understanding of transactions (which may be flawed) is that the
thread that is modifying the database via a transaction will be the
only thread to *see* those changes until it is committed. Otherwise,
how does one insert foregn keys into other tables?


On 9/5/06, Jared Greenwald <jared.greenwald@​oracle.com> wrote:
> Hash: SHA1
> Jack,
> I'm running into some fundamental issues with the sql code that I was
> wondering if you could shed some light on.
> When running the cadmin scan calls, the code is running through adding
> entries to the package, rpm, dependency (etc.) tables. The problem I'm
> seeing that that all of the updates to all of these tables seem to be
> rolled up into a huge transaction that is going to be committed all at
> once. This would be ok, but there are points in the path of inserting
> data that you check for data that you just inserted. This is a problem
> without interim commits, as the data won't always show up.
> Case and point is adding to the package table in _insertPackageTable
> (take a look, you'll see what I mean). Another place is
> _insertRpmTable. For me, I had to add commits after each of the insert
> sql statements in order for me to be able to find the correct _id that I
> just inserted.
> I understand the commit as a whole method, but I'm not sure there's any
> way around these interim commits.
> Thoughts?
> - -Jared