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

Re: attn: ghudson; FSFS and multi-threading on Unix broken?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-04-05 18:21:53 CEST

On Tue, 2005-04-05 at 11:57, Ryan Bloom wrote:
> ok, the global_mutex (that's the real name), allows you to specify the
> lock mechanism, just as apr_process_lock does, so that is easily
> resolved.

Okay, that's much closer to what we want.

But we don't want Subversion to be in the business of picking a locking
mechanism. That's why we used apr_file_lock() in the first place. We
want APR to choose a mechanism, but we want it to work over network
filesystems. If we ask APR to choose the default mechanism, it looks
like APR on Unix will choose flock/sysv/fcntl/pthreads/semaphores in
that order, which will work/fail/work/fail/fail respectively.

Worse, on Windows, it appears the locking mechanism is ignored (!) and a
mutex is used in all cases. I can only assume that this mutex is
machine-specific. We want to continue using LockFileEx() under Windows.

I'm guessing what we'll wind up doing is using apr_file_lock() under
Windows, and a global mutex with the fcntl mechanism specified under
Unix. But obviously APR is not providing quite what we want here.

(I'm looking at APR_0_9_BRANCH if that's relevant.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 5 18:22:20 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.