We recently converted to GS3.1 from GS2. Our migration and integrity
checking infrastructure currently needs to do "(ObsoleteMetaclass allInstances, Metaclass3 allInstances) asIdentitySet" to get hold of all the metaclasses in our system. Is there any way remove ObsoleteMetaclass from consideration and ensure that we have a repository that contains only Metaclass3 instances? Or will we have to live with this until such time in the future that all classes happened to convert by virtue of adding/removing/renaming instvars within them? I know that the actual ObsoleteMetaclass instances get transformed as they are faulted in. But this transformation of theirs never gets committed to the database, so in then the end they're back to square one, where they are Obsoleteclass instances that are only picked up by "ObsoleteMetaclass allInstances" and that get converted again when being faulted again. Is there any way to make the conversion "stick"? _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
I tried to achieve this by forcing the ObsoleteMetaclass instances to be
dirty somehow so that they get written back to the repository in their "converted to Metaclass3" state. But this was a no-go, since they are invariant and _beInvariantWhile: is only defined on Class, not Metaclass3. Is there any way to force a GemStone object in general to be considered dirty and written back to disk at commit time? _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by Pieter Nagel-3
[stupid gmail ... user]
---------- Forwarded message ---------- From: Dale Henrichs <[hidden email]> Date: Wed, May 14, 2014 at 8:17 AM Subject: Re: [Glass] Can one get rid of ObsoleteMetaclass instances? To: Pieter Nagel <[hidden email]> Pieter, I'm afraid that at the moment there isn't a good solution available ... as you've seen there isn't a way to do this via Smaltalk and requires primitive support.
One of our engineers has suggested that we might be able to do such a conversion for the 3.3 upgrade and I've submitted an internal bug (44234) for tracking ... Dale On Wed, May 14, 2014 at 6:29 AM, Pieter Nagel <[hidden email]> wrote: We recently converted to GS3.1 from GS2. Our migration and integrity _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by Pieter Nagel-3
On 05/14/2014 07:33 AM, Pieter Nagel wrote:
> I tried to achieve this by forcing the ObsoleteMetaclass instances to be > dirty somehow so that they get written back to the repository in their > "converted to Metaclass3" state. > > But this was a no-go, since they are invariant and _beInvariantWhile: is > only defined on Class, not Metaclass3. > > Is there any way to force a GemStone object in general to be considered > dirty and written back to disk at commit time? > You can force a metaclass to become dirty and be committed to a new page. I haven't tried it with an ObsoleteMetaclass that has been converted in memory, but it might well work. As SystemUser, add a method to Metaclass3: makeDirty name := name Then you can send this message to any metaclass, and commit, and the metaclass will be committed. For at least system classes you need to be SystemUser to avoid ObjectSecurityPolicy violations, for customer-defined classes this may not be necessary. I've tried this with Object class, and it does move pages each time I do this. Regards, -Martin _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Thanks everyone for all the advice, I'll give it a whirl ASAP.
-- Pieter Nagel _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
On 05/16/2014 09:02 AM, Pieter Nagel wrote:
> Thanks everyone for all the advice, I'll give it a whirl ASAP. > If you try my suggestion, be sure to try it in a test environment before doing it to your production database! Regards, -Martin _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by Martin McClure-5
Martin's suggestion worked well:
> As SystemUser, add a method to Metaclass3: > > makeDirty > name := name > > Then you can send this message to any metaclass, and commit, and the > metaclass will be committed. Thanks! _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |