You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2011/07/06 09:32:17 UTC

[jira] [Created] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
----------------------------------------------------------------------------------

                 Key: TORQUE-163
                 URL: https://issues.apache.org/jira/browse/TORQUE-163
             Project: Torque
          Issue Type: Bug
    Affects Versions: 3.3
            Reporter: Thomas Fox
            Assignee: Thomas Fox
             Fix For: 4.0


Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.

Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
On Torque.shutdown(), all known map builders are removed.
On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.

Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Reopened] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox reopened TORQUE-163:
-------------------------------


In an exotic use case the problem exists.
I have a normal TorqueInstance and init() and shutdown() it. Then I start a Avalon TorqueComponent. This component copies all registered Map builders from the normal TorqueInstance and rebuilds them. However, the previous shutdown on the TorqueInstance has emptied the map builder cache so the avalon component has no map builder components to build. Also the peer classes are all already loaded from previous usages so they will not register again to the avalon component. So the avalon component has an empty database map and will not work correctly.

This exotic case happens when running the torque test project in eclipse.
As a solution, I propose to not empty the map builder cache on shutdown. This will have no implication on normal init/shutdown cycles as the cached map builders know that they are built and will not build again, but will fix the above use case.

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Commented] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066012#comment-13066012 ] 

Thomas Fox commented on TORQUE-163:
-----------------------------------

I agree. But changing the peer registration process means a lot of concept-thinking and testing.
For now I'm content to just make the eclipse test work.

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Commented] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060351#comment-13060351 ] 

Thomas Vandahl commented on TORQUE-163:
---------------------------------------

Actually, the code in TorqueInstance.java (line 164ff) was supposed to handle (or rather work around) a similar case. Obviously, the removal of the cache entry in line 691 breaks this intention. Torque has no means of knowing which peers actually exist right now. Do we want to change that? It would probably have lots of implications.

Bye, Thomas.

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>             Fix For: 4.0
>
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Resolved] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox resolved TORQUE-163.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>             Fix For: 4.0
>
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Closed] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox closed TORQUE-163.
-----------------------------

    
> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>             Fix For: 4.0-beta1
>
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Commented] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066004#comment-13066004 ] 

Thomas Vandahl commented on TORQUE-163:
---------------------------------------

Agreed. The general idea of the Avalon lifecycle contract is the symmetry of initialize/dispose, start/stop etc. So the requirement would be that dispose() or shutdown() left the component or instance in the same state as it was before the first initialize() or init(). Clearly this doesn't work the way Torque is designed right now. Nevertheless, my humble opinion is that we should strive to remove as much static stuff as possible from Torque to reach that goal one day. A clean lifecycle is a Good Thing(TM), be it Avalon or not.

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Resolved] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox resolved TORQUE-163.
-------------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 4.0)

This is not a problem as the Database maps are not emptied on shutdown either.
The only purpose of the map builders is to populate the database map, so if they remain it is ok if the map builder cache is emptied.

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Commented] (TORQUE-163) Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()

Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060407#comment-13060407 ] 

Thomas Fox commented on TORQUE-163:
-----------------------------------

I'll add a test case anyway

> Map builders are emptied on Torque.shutdown() and not rebuilt on subsequent init()
> ----------------------------------------------------------------------------------
>
>                 Key: TORQUE-163
>                 URL: https://issues.apache.org/jira/browse/TORQUE-163
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>
> Problem: After a shutdown() and init() of Torque, the Map Builder cache entries which have been present before shutdown are not present anymore after a new init.
> Analysis: If a Peer class is loaded, it registers its map builder and the MapBuilder is built immediately or on Torque initialisation, depending on whether Torque is initialized or not.
> On Torque.shutdown(), all known map builders are removed.
> On a new init(), these Map builders will not be rebuilt anew because the Peer class will not be loaded a second time.
> Solution: The Map Builder cache entries should not be removed on Torque.shutdown()

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org