products/CPSUid

changeset 15:78fd39e7f303

[47300] had been done in the tag, too[47300] had been done in the tag, too[47300] had been done in the tag, too[47300] had been done in the tag, too[47300] had been done in the tag, too[47300] had been done in the tag, too[47300] had been done in the tag, too
author gracinet
date Mon, 31 Jul 2006 21:30:21 +0000
parents 3cf9561e1206
children 3a3c5ff0e8c1
files uidcounter.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/uidcounter.py
     1.2 +++ b/uidcounter.py
     1.3 @@ -89,10 +89,12 @@
     1.4  
     1.5  
     1.6      # avoid conflicts on counter current value
     1.7 -    def _p_resolveConflict(oldState, savedState, newState):
     1.8 +    def _p_resolveConflict(self, oldState, savedState, newState):
     1.9          """Avoid conflicts when changing the counter value
    1.10          """
    1.11 -        # XXX check if it's ok
    1.12 +        #XXX GR: this does resolve conflicts, but the two callers got
    1.13 +        # the same number, hence really need to randomize the uid to enforce
    1.14 +        # unicity
    1.15          bigger_counter = max(savedState['counter_current'],
    1.16                               newState['counter_current'])
    1.17          newState['counter_current'] = bigger_counter + 1