[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Using svn_hash__make instead of apr_hash__make

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Mon, 04 Jun 2012 11:48:14 +0200

Hyrum K Wright wrote:
> On Tue, May 22, 2012 at 2:35 PM, Stefan Fuhrmann<eqfox_at_web.de> wrote:
>> ...
>> On a more general note: We don't use hashes as a means to
>> randomize our data. For us, they are simply containers with
>> an average O(1) insertion and lookup behavior. The APR interface
>> also allows for iterating that container - so it *has* an ordering
>> and it has been quite stable under different operations and
>> over many versions of APR.
> I think that's the key insight here: dictionary data structures
> shouldn't be depended upon to have a stable ordering. Almost any
> generic key-value mapping type doesn't make that guarantee, and yet
> we've gotten into the bad habit of assuming it. When the underlying
> assumption became invalid, there went our code. In some ways, I guess
> we had it coming.
>
> In the long run, the problem is one of deciding out what output really
> should be canonically sorted, and then doing so. I'm not volunteering
> for the effort, but attempts to monkey with the underlying data
> structure are *not* the way to go.

O.k. Since the general consensus seems to be not to do
a blanket switch, I won't do it.

In r1345875, I simply addressed the directory deltification
issue with an appropriate TODO for later reference.

-- Stefan^2.
Received on 2012-06-04 11:49:06 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.