Re: [viewvc-dev] Bug in purge in db admin scripts

"Larry Shatzer, Jr." <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <[email protected]>
On Tue, Jul 1, 2008 at 12:54 PM, Larry Shatzer, Jr. <[email protected]>
wrote:

> [snip]
>
>> A patch from you with resolves this would be *most* welcome.
>>
>
> I hope to have an initial patch for this soon. I might have some questions
> concerning parts of best how to approach this. (See below for alternate
> idea).
>
>
>>
>> Question: would adding these additional indexes cause problems for folks
>> using ViewVC commits databases with Bonsai?  (The schemas were designed to
>> match each other.)
>>
>
> I don't know if an index would interfere with the day to day operations of
> either. For people who did not use our create table scripts (or run another
> script to apply any custom indexes) they would notice a slow down on the
> purge option. Of course any indexes that could be useful should be shared
> back with the Bonsai people.
>
> While thinking about it, the delete statements that are currently run could
> be modified to also query the checkins table to make sure it is not going to
> orphan rows with a where clause. Such as DELETE FROM files WHERE id = 'ID'
> AND id NOT IN (SELECT ID FROM checkins WHERE fileid = 'ID'), etc.
>
> And yes, I'll create a ticket to track this. :)
>

It is issue 360, and I have added a patch using the idea of using the extra
where condition checking the checkins table if other rows exist for that id.
This works since the checkins table is cleared for that repository first.
Also, I added some cleanup for the people table in the purge, and updated
the output for rebuilds, that it WILL run a purge before doing a rebuild.

-- Larry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.