Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-2023

WorkspaceInfo.dispose() does not deregister SharedItemStateManager from virtual item state providers

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.5.4
    • Component/s: jackrabbit-core
    • Labels:
      None

      Description

      Automatic disposal of idle workspaces frees unused workspaces but corresponding SharedItemStateManager (and releated PersistenceManager) is still kept in memory referenced by virtual item state providers, this can lead to memory leaks.

      1. JCR-2023.txt
        0.8 kB
        Przemo Pakulski

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        15d 2h 17m 1 Jukka Zitting 31/Mar/09 13:28
        Resolved Resolved Closed Closed
        7d 55m 1 Jukka Zitting 07/Apr/09 14:24
        Jukka Zitting made changes -
        Workflow jira [ 12454846 ] no-reopen-closed, patch-avail [ 12468258 ]
        Jukka Zitting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jukka Zitting made changes -
        Fix Version/s 1.6.0 [ 12313459 ]
        Jukka Zitting made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Jukka Zitting added a comment -

        Good point. I applied the patch in revision 760386 and merged it to the 1.5 branch in revision 760413.

        Show
        Jukka Zitting added a comment - Good point. I applied the patch in revision 760386 and merged it to the 1.5 branch in revision 760413.
        Przemo Pakulski made changes -
        Affects Version/s 1.5.4 [ 12313663 ]
        Affects Version/s 1.6.0 [ 12313459 ]
        Przemo Pakulski made changes -
        Fix Version/s 1.5.4 [ 12313663 ]
        Fix Version/s 1.6.0 [ 12313459 ]
        Affects Version/s 1.5.3 [ 12313599 ]
        Przemo Pakulski made changes -
        Field Original Value New Value
        Attachment JCR-2023.txt [ 12402262 ]
        Hide
        Przemo Pakulski added a comment -

        Attached patch which updates dispose() method of SharedItemStateManager and deregister it from virtual item state providers.

        Show
        Przemo Pakulski added a comment - Attached patch which updates dispose() method of SharedItemStateManager and deregister it from virtual item state providers.
        Hide
        Przemo Pakulski added a comment -

        During initialization of workspace SharedItemStateManager is registeres as listener fro virtual item state providers, by the following code :

        // create item state manager
        try {
        itemStateMgr = createItemStateManager(persistMgr, rootNodeId,
        ntReg, true, cacheFactory, ismLocking);
        try

        { itemStateMgr.addVirtualItemStateProvider( vMgr.getVirtualItemStateProvider()); itemStateMgr.addVirtualItemStateProvider( virtNTMgr.getVirtualItemStateProvider()); }

        catch (Exception e)

        { log.error("Unable to add vmgr: " + e.toString(), e); }

        When workspace is disposed SharedItemStateManager should be deregistered from virtual item state providers to aloow JVM to free memory.

        Show
        Przemo Pakulski added a comment - During initialization of workspace SharedItemStateManager is registeres as listener fro virtual item state providers, by the following code : // create item state manager try { itemStateMgr = createItemStateManager(persistMgr, rootNodeId, ntReg, true, cacheFactory, ismLocking); try { itemStateMgr.addVirtualItemStateProvider( vMgr.getVirtualItemStateProvider()); itemStateMgr.addVirtualItemStateProvider( virtNTMgr.getVirtualItemStateProvider()); } catch (Exception e) { log.error("Unable to add vmgr: " + e.toString(), e); } When workspace is disposed SharedItemStateManager should be deregistered from virtual item state providers to aloow JVM to free memory.
        Przemo Pakulski created issue -

          People

          • Assignee:
            Przemo Pakulski
            Reporter:
            Przemo Pakulski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development