-
Chris McDonough authored
Changes: - More stable under high usage, especially in the face of situations under which there are many ZODB conflict errors. The previous implementation had stability problems when many conflict errors were encountered; especially conflicts that were generated as a result of a simultaneous change to a subobject of the TOC (such as in the case of a Zope application which makes heavy use of both frames and sessions). - More conflict-resistant. Instead of ignoring the likelihood that multiple threads will attempt to perform the same actions simultaneously in methods of the TOC (which often causes conflicts), the new implementation attempts to avoid conflicts by employing a chance-based housekeeping model. In this model, one thread is "elected" by chance to do the kinds of tasks that cause the most conflicts. - Now uses a "timeslice" based model instead of a "ring" based model. This also helps cut down on conflicts and makes the code slighly less obfuscated (not much, though! ;-) - Quite a few more comments in the code. - Changes to the sessioning stresstest (which exposed the bug that made me reimplement the TOC in the first place). - Updates to unit tests. - A "HowTransienceWorks.stx" document which attempts to explain how the code works. It's not stellar, but it's a start. - Changes to the TransientObject class that the TOC hands out (typically as a "session data object"), in order to make invalidation less Rube-Goldberg-ish. The structure of the TOC object has changed enough that in order to maintain b/w compatibility, an in-place upgrade of "old" instances is implied by running them with this code. "Upgraded" instances are not backwards-incompatible, however, so folks can hopefully move back and forth between Zope versions without much hassle.
a7d9afc7