Re: Transaction Set clean does not actually clean
Mitko Haralanov <[email protected]> Tue, 18 Dec 2007 15:10:25 -0800
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Organization | QLogic Corporation |
| Message-ID | <[email protected]> |
On Fri, 14 Dec 2007 15:46:22 -0500 Jeff Johnson <[email protected]> wrote: > 3) The Berkeley DB INIT_CDB cursor locks on rpmdb access itself. > > INIT_CDB is used for concurrent access protection with a guarantee > that there > is only a single write or multiple readers of a Berkeley DB at any > point in time. Hi Jeff, I believe that this is (at least, party) the situation that I am dealing with. What I am noticing is that the TransactionSet acquires the READ lock on the database (in this case /var/lib/rpm/Packages) but then never releases it. If what you mentioned above is true, then the INIT_CDB will not allow a WRITE lock to be acquired by anyone unless all the READ locks have been released. The actual situation is even a bit worse: even when I have the openDB/closeDB calls in my TransactionSet wrapper, the lock to /var/lib/rpm/Packages is still held (despite the closeDB call) and, on top of everything, on subsequent reads from a Match object returned by the TransactionSet, I get this error message: error: cannot open Packages database in /var/lib/rpm I think that I am either missing something important or what I am trying to do just can't be done without changing the Python bindings. -- Mitko Haralanov [email protected] Senior Software Engineer 650.934.8064 System Interconnect Group http://www.qlogic.com ==========================================