[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: 1.1.4 Win32 test results

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-04-03 20:52:04 CEST

"Erik Huelsmann" <e.huelsmann@gmx.net> writes:

>> > This is not a problem of the tests themselves, I would like to know if
>> > we should add a retry loop the same as with deleting files.
>>
>> svn_io_remove_dir already has a retry loop, does it need to wait
>> longer?
>
> I guess it does. A 'sleep(1);' call fixes it consistently.

From io.c:

#define WIN32_RETRY_LOOP(err, expr) \
  do \
    { \
      apr_status_t os_err = APR_TO_OS_ERROR (err); \
      int sleep_count = 1000; \
      int retries; \
      for (retries = 0; \
           retries < 100 && (os_err == ERROR_ACCESS_DENIED \
                             || os_err == ERROR_SHARING_VIOLATION); \
           ++retries, os_err = APR_TO_OS_ERROR (err)) \
        { \
          apr_sleep (sleep_count); \
          if (sleep_count < 128000) \
            sleep_count *= 2; \
          (err) = (expr); \
        } \
    } \
  while (0)

it would appear to sleep for a total of about 12 seconds, I find it
odd that an additional 1 second makes a difference. Perhaps it's
because the 1s interval is longer than the maximum interval of 128ms
in the loop, you could try increasing that 128000 figure. Perhaps you
are getting some error other than ERROR_ACCESS_DENIED or
ERROR_SHARING_VIOLATION?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 3 20:53:20 2005

This is an archived mail posted to the Subversion Dev mailing list.