[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] nvm.experiment.database-management
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] nvm.experiment.database-management |
Date: |
Tue, 18 May 2010 14:07:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Lightning/1.0b2pre Thunderbird/3.0.4 |
Am 18.05.2010 13:46, schrieb Stephen Leake:
> I've looked thru the log of nvm.experiment.database-management, and the
> changes make sense, although I'm not clear how they all relate to the
> issue of searching for a database on a path.
The problem was that I stumbled across many limitations during the
implementation and fixed them "on the way" - f.e. I needed to retrieve
the branch option from _MTN/options, but there was only a
get_database_option() in work.cc. Adding another get_branch_option()
looked too stupid, so I changed the code overall... :)
Pretty much the same with the database code; I wanted to be able to
create a local, throw-away database instance without giving it a sense
of app_state, but to achieve that the random number generator and the db
implementation cache had to be moved. I thought this was a good change
because we have the long-term goal of getting rid of app_state anyways.
> It's currently crashing in the database-impl deconstructor. Part of the
> point of Boost is you're not supposed to be able to get a crash from a
> deconstructor; congratulations :).
Hehe, yes.
> Compiling with -O0 gives a better stack trace; the actual crash is in
> Botan. I suspect something is being deconstructed twice, which is often
> a bad idea, although deconstructors should be designed to handle that.
>
> But I don't see a double invocation in the debugger.
Yeah, I saw the crash in botan as well - maybe this is related to the
rng change I did on my way. Derek proposed to wrap the instance in a
shared pointer, but I'm unsure if this helps at all, because we have to
explicitely give the raw pointer away to Botan later anyways.
> Perhaps this is one reason the dbcache was a member of the application
> class?
Well, it should not - unless its considered bad practise to store
shared_ptr's in a static map - I found a couple of references with
similar problems, but no quick explanation or solution. I need to
investigate this further.
Thanks for looking!
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature