|
Re: RE: [Plone-developers] Plone 1.1 - TODO: msg#00039web.zope.plone.archetypes.devel
<snipppety-snip /> The immediate fix for this is easy - just change the size of the random Correct. Attempting to use time as anything other than the *seed* of a random number generator is a futile exercise. No matter what floating-point precision you use, you're assigning numbers based on a pattern that repeats every second. In a system where the assignment of an ID can take a fraction of a millisecond, this is obviously going to cause problems. The immediate answer (based on fewest lines of code) is to use the actual output of time.time() (floating point representation of seconds since epoch), which should prevent any ID conflicts unless you're assigning at a rate faster than the precision of time.time() (which is to 6 decimal places on my kit, but could be only to 3 DP on systems with low-resolution counters). Again, this is totally CPU dependent and is a situation that may occur... Another thought: Right now, I'm working on a patch to ReferenceEngine that Yep. I'm currently examining a situation with a number of objects that is several orders of magnitude more than required to make the current ID assignment explode. As Zope/Plone increasingly makes its way into the enterprise, this kind of situation is going to become more and more common. Nice to know that large- scale architecture is being taken into account. Regards, - seb -- Seb Potter Lead Developer Getfrank Limited ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Archetypes Installation error: 00039, Andrew R. Halko |
|---|---|
| Next by Date: | RE: RE: [Plone-developers] Plone 1.1 - TODO: 00039, sean . upton-lttx/tDbukJF6kxbq+BtvQ |
| Previous by Thread: | Re: RE: [Plone-developers] Plone 1.1 - TODOi: 00039, robert |
| Next by Thread: | RE: RE: [Plone-developers] Plone 1.1 - TODO: 00039, sean . upton-lttx/tDbukJF6kxbq+BtvQ |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |