[ https://issues.apache.org/jira/browse/HBASE-12748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14903916#comment-14903916 ]
Lars Hofhansl commented on HBASE-12748: --------------------------------------- I was thinking about something more ad hoc, but this is nice :) volatile + synchronized better than an AtomicReference? I guess it does not matter much. Should the inner list be an unmodifiable list? Could still create for all changing operations, and .get() would just return internal list, but it would unmodifiable. > RegionCoprocessorHost.execOperation creates too many iterator objects > --------------------------------------------------------------------- > > Key: HBASE-12748 > URL: https://issues.apache.org/jira/browse/HBASE-12748 > Project: HBase > Issue Type: Sub-task > Affects Versions: 0.94.25, 0.98.9 > Reporter: Vladimir Rodionov > Assignee: Andrew Purtell > Fix For: 2.0.0, 1.3.0, 0.98.15 > > Attachments: HBASE-12748.patch, HBase-12748.patch > > > This is typical pattern of enhanced for ... loop usage in a hot code path. > For every HBase operation it instantiates iterator for coprocessor list > twice. -- This message was sent by Atlassian JIRA (v6.3.4#6332)