[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8181) LMDB page leaks etc when treating DBs as data

Hallvard Breien Furuseth wrote:
> On 29/06/15 23:05, hyc@symas.com wrote:
>> Seriously, why aren't we just saying "don't do this" and moving on?
> OK, then document it.  Maybe keeping it simple, call
> mixing mainDB data and named DBs a user error and warn this
> can break the DB.
>> There are
>> lots of stupid things you can do with software. It's a waste of time and
>> energy to prevent them all.
> We totally disagree, starting with what is stupid.  But we knew
> that.

Ultimately it's redundant work. I.e., every restriction you place inside the 
code still requires documentation, otherwise all you've done is changed "why 
doesn't this work" into "why doesn't LMDB let me do what I tried to do?" 
Simpler to only write the doc and leave the code pristine.

The library's purpose is to perform its intended uses efficiently. Misuses are 
not our responsibility. Preventing misuse is the responsibility of the 
documentation, it doesn't belong in the code.

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/