[ZODB-Dev] [ zodb-Bugs-641925 ] ClientCache tracing data garbled

noreply@sourceforge.net noreply@sourceforge.net
Thu, 21 Nov 2002 08:00:49 -0800


Bugs item #641925, was opened at 2002-11-21 10: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: Guido van Rossum (gvanrossum)
Date: 2002-11-21 11: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 10: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