monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] adding note_netsync_revision_sent


From: Richard Levitte
Subject: Re: [Monotone-devel] adding note_netsync_revision_sent
Date: Thu, 22 May 2008 11:52:54 +0200 (CEST)

In message <address@hidden> on Thu, 22 May 2008 05:26:46 -0400, Stephen Leake 
<address@hidden> said:

stephen_leake> I'm using examples/display_branches.lua, and I find it very 
useful.
stephen_leake> 
stephen_leake> It would be even better if it would display a count of
stephen_leake> sent revisions by branch.
stephen_leake> 
stephen_leake> So I'd like to add a new Lua hook
stephen_leake> note_netsync_revision_sent.

For ortogonality, also add note_netsync_key_sent and
note_netsync_cert_sent.

stephen_leake> However, the current hook
stephen_leake> note_netsync_revision_received is not called at the
stephen_leake> point when the revision is received, but later in
stephen_leake> session::~session. I assume there is some rationale for
stephen_leake> that; not tying up the server longer than necessary? Or
stephen_leake> maybe calling Lua hooks must/should be done outside a
stephen_leake> db transaction guard? I'd like to document that
stephen_leake> rationale.

There's another rationale: certs come some time after the revision,
and it's only at the end that you can be sure that you've caught all
certs associated with any revision that was transfered.  Since
note_netsync_revision_received gets each revision AND all associated
certs that were transfered in the same session, I'm sure you can see
why it's only called at the end...

stephen_leake> I think I should add an object 'vector<revision_id>
stephen_leake> received_revisions' to session, add revisions to that
stephen_leake> in session::note_rev, and call the Lua hook
stephen_leake> note_netsync_revision_sent in session::~session.
stephen_leake> 
stephen_leake> Comments?

I'm ok with that addition.

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]