lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-6075) CoreAdminHandler should synchronize while adding a task to the tracking map
Date Fri, 16 May 2014 10:26:04 GMT

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

Shalin Shekhar Mangar commented on SOLR-6075:
---------------------------------------------

Looks like you have accidentally synchronized on the string and not the map. We should synchronize
on getMap(map). 

But on looking more closely at this, the maps are actually all created with Collections.synchronizedMap()
so there really is no need for this synchronization in any of the addTask/removeTask/getTask
methods.

Also, I don't see why the requestStatusMap should be static. There is only one CoreAdminHandler
so requestStatusMap should just be a final instance variable, perhaps initialised with an
unmodifiable map.

> CoreAdminHandler should synchronize while adding a task to the tracking map
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-6075
>                 URL: https://issues.apache.org/jira/browse/SOLR-6075
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Anshum Gupta
>            Assignee: Anshum Gupta
>            Priority: Critical
>             Fix For: 4.9, 5.0
>
>         Attachments: SOLR-6075.patch, SOLR-6075.patch
>
>
> CoreAdminHandler should synchronize on the tracker maps when adding a task. It's a rather
nasty bug and we should get this in asap.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message