[ 
https://issues.apache.org/jira/browse/ARTEMIS-2720?focusedWorklogId=424393&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-424393
 ]

ASF GitHub Bot logged work on ARTEMIS-2720:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Apr/20 20:16
            Start Date: 17/Apr/20 20:16
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on pull request #3089: 
ARTEMIS-2720 Optimize HierarchicalObjectRepository
URL: https://github.com/apache/activemq-artemis/pull/3089#discussion_r410448783
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/HierarchicalObjectRepository.java
 ##########
 @@ -172,7 +172,12 @@ private void addMatch(final String match, final T value, 
final boolean immutable
       lock.writeLock().lock();
       try {
          String modifiedMatch = matchModifier.modify(match);
-         clearCache();
+         // an exact match (i.e. one without wildcards) won't impact any other 
matches so no need to clear the cache
+         if (usesWildcards(modifiedMatch)) {
 
 Review comment:
   This is tempting, but I don't think this is correct.
   
   you may be removing an entry that was part of another wildcard. The cache 
has to be cleared on the other side as well.
   
   
   I will add a test that would be broken by your change here.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 424393)
    Time Spent: 50m  (was: 40m)

> Optimize HierarchicalObjectRepository
> -------------------------------------
>
>                 Key: ARTEMIS-2720
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2720
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> There are a couple of simple optimizations which would make 
> {{org.apache.activemq.artemis.core.settings.impl.HierarchicalObjectRepository}}
>  faster, especially when used with lots of exact matches.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to