[Zope-dev] Re[2]: [Checkins] SVN: zope.server/trunk/s fix of 599 error on conflict error in request

Adam Groszer agroszer at gmail.com
Mon Feb 4 09:27:20 EST 2008


Hello Christian,

I'm sorry Christian. Points taken, I'll try to do better next time.

Actually the issue was an edge case.
See my mail: http://mail.zope.org/pipermail/zope-dev/2008-January/030844.html

Solution is to change:
        response = request.response
        publish(request)
        #do something with response
to:
        request = publish(request)
        response = request.response
        #(or equivalent)

The missing tests are missing, because it seemed not that easy to do
it. I would appreciate some help. btw, all existing tests pass.

Monday, February 4, 2008, 1:23:24 PM, you wrote:

CT> Hi,

CT> Adam Groszer schrieb:
>> Log message for revision 83382:
>>   fix of 599 error on conflict error in request
>>   see: http://mail.zope.org/pipermail/zope-dev/2008-January/030844.html
>> 
>> Changed:
>>   U   zope.server/trunk/setup.py
>>   U   zope.server/trunk/src/zope/server/ftp/publisher.py
>> 
>> -=-
>> Modified: zope.server/trunk/setup.py
>> ===================================================================
>> --- zope.server/trunk/setup.py        2008-02-01 15:08:00 UTC (rev 83381)
>> +++ zope.server/trunk/setup.py        2008-02-01 15:19:32 UTC (rev 83382)
>> @@ -30,10 +30,10 @@
>>        long_description=open('README.txt').read(),
>>  
>>        packages=find_packages('src'),
>> -       package_dir = {'': 'src'},
>> +      package_dir = {'': 'src'},
>>  
>>        namespace_packages=['zope',],
>> -      
>> +
>>        tests_require = ['zope.testing',
>>                         'zope.i18n',
>>                         'zope.component'],
>> @@ -41,7 +41,8 @@
>>                            'zope.interface',
>>                            'zope.publisher',
>>                            'zope.security',
>> -                          'zope.deprecation'],
>> +                          'zope.deprecation',
>> +                          'ZODB3'],
>>        include_package_data = True,
>>        zip_safe = False,
>>        entry_points = """

CT> Please try to avoid mixing mixing checkins with different purposes. This
CT> whitespace change should be a separate checkin.

>> Modified: zope.server/trunk/src/zope/server/ftp/publisher.py
>> ===================================================================
>> --- zope.server/trunk/src/zope/server/ftp/publisher.py        2008-02-01 15:08:00 UTC (rev 83381)
>> +++ zope.server/trunk/src/zope/server/ftp/publisher.py        2008-02-01 15:19:32 UTC (rev 83382)
>> @@ -51,7 +51,7 @@
>>          return self._execute(path, 'ls', split=False, filter=filter)
>>  
>>      def readfile(self, path, outstream, start=0, end=None):
>> -        return self._execute(path, 'readfile', 
>> +        return self._execute(path, 'readfile',
>>                               outstream=outstream, start=start, end=end)
>>  
>>      def lsinfo(self, path):
>> @@ -108,9 +108,12 @@
>>  
>>          # Note that publish() calls close() on request, which deletes the
>>          # response from the request, so that we need to keep track of it.
>> -        response = request.response
>> -        publish(request)
>> -        return response.getResult()
>> +        # agroszer: 2008.feb.1.: currently the above seems not to be true
>> +        # request will KEEP the response on close()
>> +        # even more if a retry occurs in the publisher,
>> +        # the response will be LOST, so we must accept the returned request
>> +        request = publish(request)
>> +        return request.response.getResult()

CT> Same comment as previously, please avoid this style of annotation. Also,
CT> it doesn't look like the issue is actually finally resolved as you say
CT> `seems`.

CT> SVN tracks who edited what and when, the statement of your name and the
CT> change date isn't necessary.

CT> Again, a test case is missing.

CT> Please review your other related checkins as well.

CT> Christian



-- 
Best regards,
 Adam Groszer                            mailto:agroszer at gmail.com
--
Quote of the day:
The attacker must vanquish; the defender need only survive.



More information about the Zope-Dev mailing list