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

Re: repository too slow suddenly

From: mark benedetto king <mbk_at_lowlatency.com>
Date: 2003-08-14 22:55:41 CEST

On Thu, Aug 14, 2003 at 01:52:14PM -0400, mark benedetto king wrote:

Sorry to follow up to my own post, but here it is in apr:

For normal opens:

   apr_file_t *file;

   status = apr_file_open(&file, lockfile, APR_READ | APR_WRITE,
                                          APR_OS_DEFAULT, pool);
   if (status) {
     error("could not open lockfile!");
   }

   /* note: we could remove the nonblock here and simply block until
      recovery is complete. */
   status = apr_file_lock(file, APR_FLOCK_SHARED | APR_FLOCK_NONBLOCK);
   if (status) {
     error("repository is currently being recovered!");
   }

And for recover:

   status = apr_file_open(&file, lockfile, APR_READ | APR_WRITE,
                                          APR_OS_DEFAULT, pool);
   if (status) {
     error("could not open lockfile!");
   }

   status = apr_file_lock(file, APR_FLOCK_NONBLOCK);
   if (status) {
     error("repository is currently in use!");
   }

--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 14 22:56:47 2003

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