You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryuuichi Kumai (JIRA)" <ji...@apache.org> on 2009/01/26 15:45:59 UTC
[jira] Created: (SOLR-985) TemplateString is not thread-safe
TemplateString is not thread-safe
---------------------------------
Key: SOLR-985
URL: https://issues.apache.org/jira/browse/SOLR-985
Project: Solr
Issue Type: Bug
Components: contrib - DataImportHandler
Affects Versions: 1.3
Reporter: Ryuuichi Kumai
TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-985) TemplateString is not thread-safe
Posted by "Ryuuichi Kumai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryuuichi Kumai updated SOLR-985:
--------------------------------
Attachment: SOLR-985.patch
> TemplateString is not thread-safe
> ---------------------------------
>
> Key: SOLR-985
> URL: https://issues.apache.org/jira/browse/SOLR-985
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Ryuuichi Kumai
> Attachments: SOLR-985.patch
>
>
> TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
> Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (SOLR-985) TemplateString is not
thread-safe
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667267#action_12667267 ]
noble.paul edited comment on SOLR-985 at 1/26/09 7:38 AM:
----------------------------------------------------------
making that instance non-static should be fine. right?
but this is a better solution because across imports this will give better perf
was (Author: noble.paul):
making that instance non-static should be fine. right?
> TemplateString is not thread-safe
> ---------------------------------
>
> Key: SOLR-985
> URL: https://issues.apache.org/jira/browse/SOLR-985
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Ryuuichi Kumai
> Attachments: SOLR-985.patch
>
>
> TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
> Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SOLR-985) TemplateString is not thread-safe
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar reassigned SOLR-985:
------------------------------------------
Assignee: Shalin Shekhar Mangar
> TemplateString is not thread-safe
> ---------------------------------
>
> Key: SOLR-985
> URL: https://issues.apache.org/jira/browse/SOLR-985
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Ryuuichi Kumai
> Assignee: Shalin Shekhar Mangar
> Attachments: SOLR-985.patch
>
>
> TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
> Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-985) TemplateString is not thread-safe
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shalin Shekhar Mangar resolved SOLR-985.
----------------------------------------
Resolution: Fixed
Committed revision 737771.
Thanks Ryuuichi!
I changed the patch to remove putIfAbsent since we cannot save the object creation with or without it.
> TemplateString is not thread-safe
> ---------------------------------
>
> Key: SOLR-985
> URL: https://issues.apache.org/jira/browse/SOLR-985
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Ryuuichi Kumai
> Assignee: Shalin Shekhar Mangar
> Attachments: SOLR-985.patch
>
>
> TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
> Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-985) TemplateString is not thread-safe
Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667267#action_12667267 ]
Noble Paul commented on SOLR-985:
---------------------------------
making that instance non-static should be fine. right?
> TemplateString is not thread-safe
> ---------------------------------
>
> Key: SOLR-985
> URL: https://issues.apache.org/jira/browse/SOLR-985
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Ryuuichi Kumai
> Attachments: SOLR-985.patch
>
>
> TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
> Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-985) TemplateString is not thread-safe
Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667274#action_12667274 ]
Shalin Shekhar Mangar commented on SOLR-985:
--------------------------------------------
I think this is better because even within an import, DocBuilder.getVariableResolver() is called many times.
> TemplateString is not thread-safe
> ---------------------------------
>
> Key: SOLR-985
> URL: https://issues.apache.org/jira/browse/SOLR-985
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Ryuuichi Kumai
> Attachments: SOLR-985.patch
>
>
> TemplateString is not thread-safe but it is being used concurrently by many cores due to the static instance.
> Currently TemplateString#cache is not synchronized, and static instance of TemplateString is used by VariableResolverImpl#replaceTokens().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.