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

Re: libsvn_repos logging -- design problems

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-07-15 19:02:59 CEST

Ben Collins-Sussman wrote:

> * PROBLEM: lots of processes all trying to write to logfiles.
>
> How do we mediate write access to a single logfile with N processes
> all trying to write to it at once?
>
> Possible Solutions?
>
> flock() style stuff, like the 'write lock' in FSFS?

write() is atomic. If you construct whole lines at a time, and write
them with a single write(), that'll work just fine.

The only catch is that you have to flush() the log file handles before
you fork(), otherwise weird things happen.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 15 19:04:08 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.