O/H Joshua Chamas έγραψε:
Thanos Chatziathanassiou wrote:
Hi list,
I have a rather strange issue:
I came across a 102 MB $Application object, which contains several
little key => arrayref_value elements.
The keys are usually HTTP_USER_AGENTs and the values 2 fairly short
strings.
I'm using MLDBM::Sync::SDBM_File.
Curiously, scalar(keys(%{$Application})) returns just 4 elements and
indeed iterating over keys returns only 4.
Problem is, when running from the command line on a plain copy, it
correctly returns both the number of elements and their keys/values.
Any idea what might be wrong ?
Hi Thanos,
From time to time I have found SDBM_File to do odd unreproducible things.
If you suspect this is true you might run with a different DBM like
DB_File.
Regards,
Josh
The thing that strikes me is that asking for a particular key works as
expected.
Can I port the stored keys with
tie %A, "SDBM_File", "application", O_RDONLY, 0660;
tie %B, "DB_File", "new/application", O_CREAT|O_RDWR, 0660, $DB_HASH ;
%B = %A;
untie %A;
untie %B;
and restart apache ?
Also, GDBM_File looks a little faster than DB_File. Would I want to use
that instead ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]