[Glass] migrate problem
Norbert Hartl
norbert at hartl.name
Thu Jan 16 13:07:19 PST 2014
Johan,
thank you very much for your help.
Am 16.01.2014 um 20:24 schrieb Johan Brichau <johan at yesplan.be>:
> Norbert,
>
> I had the problem of 'double classes' in the past as well when I did loading via Monticello in gemtools rather than in topaz and using the GsDeployer.
> I retained the following script to fix that (which I believe was whipped up by Dale at that time)
>
> |classesWithOldSuperclasses|
> classesWithOldSuperclasses := Set new.
> Smalltalk allClasses do:[:s |
> Smalltalk allClasses do:[:c |
> (c superclass name = s name and:[(c superclass = s) not]) ifTrue:[classesWithOldSuperclasses add: c]]].
> classesWithOldSuperclasses do:[:c | Transcript show: c name;cr. c definition evaluate]
>
I’ve developed a similar script to find the bogus classes. Most of them where there because of the side effect of one bogus class keeping a bogus superclass. In the end I removed all objects and rewired the inheritance tree manually. The code is working now and the objects are transferred to another system anyway. But this time it felt much harder then the last time.
Now I’m just wondering why the mark for collect only marked a little more than 300.000 objects to be removed while I think I removed approx. 40 million. The adventures continues.
thanks,
Norbert
> Hope it helps
> Johan
>
> On 16 Jan 2014, at 20:18, Norbert Hartl <norbert at hartl.name> wrote:
>
>> Dale,
>>
>> that didn’t work. Now I have some of the classes doubled and some tripled. I need to try a few more things. I was just wondering that the migrateTo: does not work as expected. I did this a few times in the past and it always worked like that. Or I just can’t remember correctly.
>>
>> Norbert
>>
>> Am 16.01.2014 um 17:37 schrieb Dale Henrichs <dale.henrichs at gemtalksystems.com>:
>>
>>> Norbert,
>>>
>>> I am not a migration expert and I haven't read the docs (yet), but in reading the code, I think that you are supposed to send the #migrate message to instances of your class ...
>>>
>>> Have you looked at GsDeployer? I think the following will do a pretty good job of migrating the instances for you:
>>>
>>> GsDeployer bulkMigrate: ["add instance variable to class"]
>>>
>>> in fact I think right now you should be able to do:
>>>
>>> GsDeployer bulkMigrate: ["empty block"]
>>>
>>> and get "pending migrations performed"....
>>>
>>> Dale
>>>
>>>
>>> On Thu, Jan 16, 2014 at 7:25 AM, Norbert Hartl <norbert at hartl.name> wrote:
>>> I have one class hierarchy that has between 40 and 50 Mio. instances. Now I needed to add an instVar to the root of the hierarchy. Doing it with gemtools I switched off auto migration and loaded the monticello package containing the changed. But now I have problems migrating the instances manually.
>>>
>>> COEvent allSubclasses size
>>>
>>> gives 5 while
>>>
>>> COEvent classHistory first allSubclasses size
>>>
>>> gives 23. A
>>>
>>> COEvent classHistory first migrateTo: COEvent
>>>
>>> didn’t do the trick. And
>>>
>>> COEvent migrate
>>>
>>> gives me
>>>
>>> a MessageNotUnderstood occurred (error 2010), a Metaclass3 does not understand #’migrationDestination'
>>>
>>> I’m using
>>>
>>> GemStone version ‚3.1.0.2'
>>>
>>> Any hints,
>>>
>>> Norbert
>>>
>>> _______________________________________________
>>> Glass mailing list
>>> Glass at lists.gemtalksystems.com
>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>>
>>>
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
More information about the Glass
mailing list