[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] ViewMTN seems to have trouble talking to monotone
From: |
Timothy Brownawell |
Subject: |
Re: [Monotone-devel] ViewMTN seems to have trouble talking to monotone |
Date: |
Wed, 28 Jan 2009 18:54:23 -0600 |
On Thu, 2009-01-29 at 01:24 +0100, Ludovic Brenta wrote:
> Timothy Brownawell writes:
> > Is viewmtn looking at the same database as a "mtn serve" process?
> > Monotone will give errors if you try to use a db that another
> > process has locked for writing (such as a server with an active
> > connection).
>
> Yes. Actually this idea occurred to me just moments ago and our mails
> crossed each other.
>
> What would you recommend? Setting up separate databases might not
> avoid the problem entirely; ViewMTN would still get the same problem
> while syncing the two databases.
One way is to have 2 rotated databases for viewmtn, with a script
similar to:
mtn pull localhost '*' -d database.transfer
ln database.viewmtn database.tmp
mv database.transfer database.viewmtn
mv database.tmp database.transfer
forked off by a post-netsync hook on the server, or something running
that in a loop waiting for a wake-up from the server hook.
Another way is to use nvm.tbrownaw.serve_automate as the server, so that
viewmtn can connect to it over the loopback interface and run automate
commands through the single server process (viewmtn will of course need
to be modified for this, possibly just running "socat
tcp:localhost:12345 -" instead of "mtn automate stdio").
> OTOH, since traffic is low, I tend
> to think the best would be that ViewMTN detect the condition and
> report it to the user in a meaningful way. Is that difficult to
> implement?
No idea... catch the MonotoneException in some function that wraps
around all the page handlers and do something there, maybe?
> Thanks for ViewMTN, BTW. I've been using it for years with very few
> problems so far.
That would actually be Grahame Bowland.
--
Timothy
Free (experimental) public monotone hosting: http://mtn-host.prjek.net