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

Re: [BUG?] svn_fs__dag_remove_node does not cleanup all references to the deleted node

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-03-15 20:25:20 CET

kfogel@collab.net wrote:
> "Max Bowsher" <maxb@ukf.net> writes:
>> When a node-rev is deleted from the fs (because it was added then deleted
in
>> the same revision), svn_fs__dag_remove_node can leave behind references
to
>> it in the copies and changes tables.
>>
>> I haven't observed this causing any actual problems, except that if in
the
>> future there is a tool which verifies the consistency of svn
repositories,
>> it will find 'corruption'.
>>
>> I think what needs to happen is:
>>
>> * Scan the txn containing the node-rev for copies. Check each copy, if it
>> refers to the node-rev being removed, delete it from the copies table and
>> txn record.
>> * Scan the changes table and delete any change-records referring to the
>> node-rev being removed.
>>
>> Comments?
>
> It shouldn't be possible for a copy to have a source in the same
> revision in which the copy is committed. That is, the "history" in an
> add-with-history can only refer to nodes in committed revisions, not
> new nodes in the same txn as the add.
>
> So, this shouldn't be a problem... ?
>
> -Karl

No, it is still a problem:

* Begin revision rN
* Add-with-history some-node copyfrom r(N-1)
* Delete some-node. Because still mutable,
    entirely deleted from 'nodes'
* End revision rN

Now 'copies' contains an entry with dest-node == the-deleted-node,
and 'changes' contains entries also referring to the-deleted-node.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 15 20:25:56 2004

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.