You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Helge Dannenberg (Created) (JIRA)" <ji...@apache.org> on 2011/10/28 15:22:32 UTC

[jira] [Created] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
--------------------------------------------------------------------------------------------

                 Key: POOL-192
                 URL: https://issues.apache.org/jira/browse/POOL-192
             Project: Commons Pool
          Issue Type: Bug
    Affects Versions: 1.5.6
            Reporter: Helge Dannenberg


If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
never decreased.

As a result of this bug the pool exhausts even if the pool is empty.

The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Helge Dannenberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173864#comment-13173864 ] 

Helge Dannenberg commented on POOL-192:
---------------------------------------

Vielen Dank für Ihre E-Mail. Ich bin voraussichtlich am 09.01.2012 wieder im Hause. In dringenden Fällen wenden Sie sich bitte an Dieter Frank (+49 69 696 8113) oder Christian Peter (+49 69 696 72449) Mit freundlichen Grüßen, Helge Dannenberg ----- I'm out of office until 09th of January 2012. In urgent cases please contact Mr Dieter Frank (+49 69 696 8113) or Mr Christian Peter (+49 69 696 72449) Best regards, Helge Dannenberg

                
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>             Fix For: 1.5.7
>
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Helge Dannenberg (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Helge Dannenberg updated POOL-192:
----------------------------------

    Comment: was deleted

(was: Na ja... Immerhin fehlerfrei ;-)


Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Aktiengesellschaft, Kelsterbach, Registereintragung / Registration: Amtsgericht Darmstadt 84307
Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board: Stephan Gemkow
Vorstand / Executive Board: Stefan Hansen (Vorsitzender / Chairman), Dr. Gunter Kuechler
 
)
    
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Closed] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Phil Steitz (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed POOL-192.
----------------------------

    
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>             Fix For: 1.5.7
>
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Phil Steitz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated POOL-192:
-----------------------------

    Fix Version/s: 1.5.7

Thanks for reporting this.
                
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>             Fix For: 1.5.7
>
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Helge Dannenberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138406#comment-13138406 ] 

Helge Dannenberg commented on POOL-192:
---------------------------------------

Na ja... Immerhin fehlerfrei ;-)


Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Aktiengesellschaft, Kelsterbach, Registereintragung / Registration: Amtsgericht Darmstadt 84307
Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board: Stephan Gemkow
Vorstand / Executive Board: Stefan Hansen (Vorsitzender / Chairman), Dr. Gunter Kuechler
 

                
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Christian Peter (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138398#comment-13138398 ] 

Christian Peter commented on POOL-192:
--------------------------------------

The value of ??_totalInternalProcessing?? is increased by the number of elements in the queue in method ??clear(Object key)??, just before ??destroy?? is called.

As the ObjectQueue for the key was removed from the map in method ??clear??, the object for the key is always null in method ??destroy??.

Therefore ??_totalInternalProcessing?? is never decreased there which leads to an incorrect value of ??_totalInternalProcessing??.

Suggested fix in ??destroy(Map m, KeyedPoolablabeObjectFactroy factory)??:

??ObjectQueue objectQueue = (ObjectQueue) _poolMap.get(key);??
??if (objectQueue != null) {??
   ...
??}??
*else {*
    *_totalInternalProcessing--;*
*}*

                
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (POOL-192) GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter

Posted by "Phil Steitz (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz resolved POOL-192.
------------------------------

    Resolution: Fixed

Fixed in r1205266.  Thanks for the patch!
                
> GenericKeyedObjectPool: clear() clears the keyed pool but does not decrease the item counter
> --------------------------------------------------------------------------------------------
>
>                 Key: POOL-192
>                 URL: https://issues.apache.org/jira/browse/POOL-192
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Helge Dannenberg
>             Fix For: 1.5.7
>
>
> If function 'clear(Object key)' in GenericKeyedObjectPool is called onto a keyed pool, the ObjectQueue (= the keyed pool) is removed from the pool list. 
> Its items are deleteded in the function 'destroy()' afterwards. But as the ObjectQueue is already removed, the itemcounter _totalInternalProcessing is 
> never decreased.
> As a result of this bug the pool exhausts even if the pool is empty.
> The solution is to decrease the counter _totalInternalProcessing in 'destroy()' also if ObjectQueue in null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira