Re: More object index weirdness

[prev] [thread] [next] [Date index for 2004/09/16]

From: William McKee
Subject: Re: More object index weirdness
Date: 15:16 on 16 Sep 2004
On Thu, Sep 16, 2004 at 10:09:23AM -0400, Perrin Harkins wrote:
> On Thu, 2004-09-16 at 09:46, William McKee wrote:
> > The situation I'm facing is that if I delete a record in the might_have
> > relationship, it's somehow not disappearing from the object index.
> 
> I can't be sure what you mean by this.  Can you show some code?  How do
> you delete the record?  How do you know it's still in the index?

Hi Perrin,

Unfortunately, the problem is buried in a pile of code. I really don't
have time now to try to create a reproducible test. I realize this
doesn't help you to answer my questions.

At any rate, I know the object is still in the index because I can dump
the contents of the Live_Objects hash using the hack I mentioned
yesterday. Also, if I add remove_from_object_index, the code works
successfully.


> > Is that
> > index possibly not being updated if the record is not found and
> > therefore the old record is kept around?
> 
> The old record is only kept around if you have a copy of it in memory
> somewhere.

But why wouldn't it be updated/removed if it's no longer in the
database? Does the index not get refreshed when a record is reloaded?
If not, then it would seem to me that the index is acting more like a
cache. I suppose it could be the case that existing objects take
precedence over incoming objects when an object is already in the index.
Does that explain the behavior I am seeing?

I'm beginning to understand that my mystery objects are due to
references being kept in memory; I'm just having trouble tracking down
where they are being stored. I'm using strict and try to stay away from
globals. Looking through /perl-status on my webserver, I don't see any
scalars or hashes sticking around in my modules (/perl-status?sybdump).

Ahha! It could be that I have multiple instances of Apache running, each
with it's own object index. I remove the object in process A but it's
still hanging around in process B. But that would still mean I'm keeping
objects around in memory and simply doing a remove_object_from_index in
process A wouldn't affect process B (would it?). I really need to find
why that object is being maintained in memory. Any pointers? This task
seems as difficult as finding a memory leak.


Thanks,
William

        -- 
        Knowmad Services Inc.
http://www.knowmad.com

(message missing)

More object index weirdness
William McKee 13:46 on 16 Sep 2004

Re: More object index weirdness
Perrin Harkins 14:09 on 16 Sep 2004

Re: More object index weirdness
William McKee 15:16 on 16 Sep 2004

Re: More object index weirdness
Perrin Harkins 15:30 on 16 Sep 2004

Re: More object index weirdness
William McKee 16:19 on 16 Sep 2004

Re: More object index weirdness
Perrin Harkins 16:40 on 16 Sep 2004

Re: More object index weirdness
William McKee 17:02 on 16 Sep 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52