db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5267) Shut down engine for old versions in upgrade tests to save memory
Date Thu, 09 Jun 2011 14:48:59 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-5267:
--------------------------------------

    Attachment: shutdown-engine.diff

The attached patch makes PhaseChanger shut down the engine, instead of shutting down each
database individually, at the end of each phase. This made the upgrade test run again on phoneME
in my environment.

I had hoped that a change like this would reduce the memory usage on Java SE too, but that
doesn't seem to be the case, because the old versions of the driver (and thereby all the engine
classes) is still referenced from the DriverManager. (There's no DriverManager in JSR-169,
that's why it's not a problem on phoneME.) It might possibly be solved by deregistering the
driver manually, but there's some trickiness involved because of the upgrade tests' use of
special class loaders to load the old Derby versions and DriverManager not allowing the deregistering
of drivers registered in other class loaders, so I'm not addressing that issue right now.

> Shut down engine for old versions in upgrade tests to save memory
> -----------------------------------------------------------------
>
>                 Key: DERBY-5267
>                 URL: https://issues.apache.org/jira/browse/DERBY-5267
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: shutdown-engine.diff
>
>
> The memory requirements for the upgrade tests seem to go up each time we add a new release.
Lately, they've started failing on phoneME with the error message saying "Number of class
names exceeds vm limit." It looks to me as if the problem is that we don't shut down the engine
when we've finished testing a version, so we eventually end up with 19 different versions
of the engine loaded in the same process. I think it would be good to shut down the old engines
when we're done with them to free up resources.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message