qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6861) Avoid unsafe read of AMQPConnection_0_8#_channelMap
Date Wed, 18 Nov 2015 15:22:11 GMT

    [ https://issues.apache.org/jira/browse/QPID-6861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011177#comment-15011177
] 

Keith Wall commented on QPID-6861:
----------------------------------

{{ConcurrentHashMap}} states in its API that {{#values()}} will never throw a CME.    I left
{{#getSessionModels()}} return a defensive copy because modifications to a CHM's values would
affect the map itself.

{quote}
The view's <tt>iterator</tt> is a "weakly consistent" iterator
     * that will never throw {@link ConcurrentModificationException},
     * and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to)
     * reflect any modifications subsequent to construction.
{quote}

> Avoid unsafe read of AMQPConnection_0_8#_channelMap
> ---------------------------------------------------
>
>                 Key: QPID-6861
>                 URL: https://issues.apache.org/jira/browse/QPID-6861
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: qpid-java-6.0
>            Reporter: Keith Wall
>            Assignee: Lorenz Quack
>             Fix For: qpid-java-6.0
>
>
> AMQPConnection_0_8#_channelMap is published safely, but the method #getChannel is unsafe
and may read a stale value.  This may have caused a failure during a perf test run.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message