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: Stephen Leake
Subject: Re: [Monotone-devel] adding note_netsync_revision_sent
Date: Fri, 23 May 2008 02:19:51 -0400
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (windows-nt)

Richard Levitte <address@hidden> writes:

> 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.

Ok.

> 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...

Ah. That makes sense.

> 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.

Ok, I'll work on it.

-- 
-- Stephe




reply via email to

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