[ZODB-Dev] [ zodb-Bugs-641925 ] ClientCache tracing data garbled
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 21 Nov 2002 08:44:51 -0800
Bugs item #641925, was opened at 2002-11-21 15:23
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=115628&aid=641925&group_id=15628
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Nobody/Anonymous (nobody)
Summary: ClientCache tracing data garbled
Initial Comment:
The ClientCache tracing data can be garbled when there
are multiple ClientStorage instances in the same
process, for example, when external mounts are used.
This is because each ClientStorage instance has its own
ClientCache, and they all use the same environment
variable to open the trace file.
Sharing the trace file really doesn't make any sense
(since the caches aren't shared) so the best we can do
is to set a global variable to indicate that we're
already tracing, and then ignore tracing on subsequent
ClientCache instantiations.
----------------------------------------------------------------------
Comment By: Chris Withers (fresh)
Date: 2002-11-21 16:44
Message:
Logged In: YES
user_id=24723
Would a lock help?
I would imagine most people in the situation of having
multiple ClientStorages on a single ZEO client will be in a
similar position to me and will want to analyze the cache
size of each ClientStorage individually.
Would this be possible with a lock?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-21 16:41
Message:
Logged In: YES
user_id=6380
Unfortunately, since often the default storage name ("1") is
used multiple times (if they are on different ZEO storage
servers), this isn't enough. Some kind of lock may be
necessary. :-(
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-21 16:00
Message:
Logged In: YES
user_id=6380
Very easy, as long as the storage names are distinct!
See patch.
----------------------------------------------------------------------
Comment By: Chris Withers (fresh)
Date: 2002-11-21 15:31
Message:
Logged In: YES
user_id=24723
What I'd like to see is the file called
os.environ['ZEO_CACHE_TRACE']+'-'+storagename, if you see
what I mean, that way you can get a trace for each mounted
storage as appropriate. I think the storage name specified
in ClientStorage's contructor would be ideal.
In my app, I can imagine the caches needing to be very
different sizes, since each storage varies in size and
number of reads/writes a lot.
Would that be to easy do?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=115628&aid=641925&group_id=15628