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

Re: upgrade test failures

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 18 Apr 2009 13:39:25 +0200

What if you just toss loggy from the upgrade story (for the v12
upgrade, if possible; leaving it there for now for v11 upgrades). Or
if you can't, then keep this in mind for the future.

How about:

1) Port entries and property data into wc.db
2) Remove 'entries'
3) Remove all property files

If an interruption happens at any point, this is detectable by
'entries' *and* 'wc.db' present in the subdirectory. When that
happens, remove wc.db and start again.

Oh, hmm. We don't want to have to stat for 'entries' every time we
look in a .svn subdir, let alone stat around looking for un-removed
prop files. Alrighty. There needs to be something in the database that
will give us an indication of "in-process on upgrading; if you're
seeing this, then it was interrupted; go investigate". Something in
the format number? Maybe a temporary table whose presence/absence acts
as a boolean?

Cheers,
-g

On Fri, Apr 17, 2009 at 18:29, Hyrum K. Wright
<hyrum_wright_at_mail.utexas.edu> wrote:
>
> On Apr 16, 2009, at 11:32 PM, Greg Stein wrote:
>
>> Hey Hyrum,
>>
>> I saw a couple core dumps from my wc-ng test run and took a look at
>> one. This was from one of the upgrade tests. The problem is pretty
>> easy to explain... solution? Euh...
>>
>> We point DB at a v11 directory, and it records that in a wcroot_t
>> structure. There is no SDB for v11, so that member is NULL.
>>
>> Later, we come along and say "no. make that directory v12." But we
>> don't update the SDB or WC_ID members of the structure. When code
>> later executes, it says "oh, v12!" and proceeds to use the SDB. BOOM.
>>
>> Normally, the SDB is created when the wcroot_t is created. And we read
>> the format at that time. The reset_format is monkeying with our
>> expectations.
>>
>> I think the right answer is to have wc_db *forget* the wcroot_t
>> structure (just store NULL; the PDH can stick around). Then call
>> wc_db__init() for the directory in question. Next time wc_db looks at
>> the directory, it will detect the version as a v12 directory.
>
> We already call wc_db__init(), but that's before we get around to reading
> the old entries, or writing the new ones.  In general, the order of
> operations (including loggy) is this:
>
> 1) Read the old "this dir" entry
> 2) Use the old "this dir" entry to call svn_wc__entries_init() (which calls
> wc_db__init())
> 3) Handle wcprop conversion
> 4) Set the new wc format
> 5) Read the old entries
> 6) Write the entries in the new format
> 7) Remove the old entries file
>
> Most of that happens loggily, so I'm not really sure where the best place to
> nuke the pdh->wcroot value would be, nor how that can be accomplished.  The
> current upgrade implementation is nothing but transitional code for when we
> migrate to wc-ng, and will need to be seriously re-evaluated for a more
> permanent solution.  Among the issues: the role of loggy and atomic
> upgrades.
>
> -Hyrum
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1788108
Received on 2009-04-18 13:39:58 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.