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

Re: BDB: implementing 'upgrade' for fs-successor-ids

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 21 Sep 2011 13:18:21 -0400

On 09/21/2011 12:58 PM, Daniel Shahaf wrote:
> C. Michael Pilato wrote on Wed, Sep 21, 2011 at 12:13:17 -0400:
>> On 09/21/2011 11:50 AM, C. Michael Pilato wrote:
>>> Well, BDB being a real database, we can do this sort of backfill operation
>>> without attending to any higher-level Subversion concepts such as revisions
>>> at all. A cursor walk through the `nodes' table should suffice:
>>>
>>> for key, value in nodes_table.rows()
>>> successor_id = key
>>> node_rev = parse_node_revision_skel(value)
>>> successors_table.add_row(node_rev.predecessor_id, successor_id)
>>
>> I should point out, though, that this approach is definitely *not* to be
>> used on a live repository.
>>
>
> ... because new entries might be inserted to NODES by concurrent
> writers, and preventing that requires an exclusive lock that would
> block concurrent readers and writers for too long?

Precisely. We need a sort of check-off list of which nodes-rev have been
processed, right? That list is as simple as "all previous rows" when using
a cursor in an offline repository, but isn't so clean otherwise.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-09-21 19:18:55 CEST

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.