[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491290 ] Andrzej Bialecki commented on NUTCH-471: - +1. Nice trick with the unsynchronized check. :) > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491305 ] Sami Siren commented on NUTCH-471: -- Isn't the DCL declared to be broken? We could perhaps instead instantiate NutchBean in ServletContextListener once at startup? > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491313 ] Enis Soztutar commented on NUTCH-471: - > Nice trick with the unsynchronized check. :) Wow, indeed i have used a pattern w/o knowing about it :) Seemed a simple and efficient solution to me. >Isn't the DCL declared to be broken? After reading http://en.wikipedia.org/wiki/Double-checked_locking, i can say that this a very subtle bug. As suggested we can fix it by declaring NutchBean volatile. However i guess, that in that case would the servlet container should also be configured to use Java 1.5 instead of 1.4. > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506883 ] Doğacan Güney commented on NUTCH-471: - We have been using this on our machines for some time, so if there are no objections, I am going to commit this one later today. > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch, > NutchBeanCreationSync_v2.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507145 ] Hudson commented on NUTCH-471: -- Integrated in Nutch-Nightly #125 (See [http://lucene.zones.apache.org:8080/hudson/job/Nutch-Nightly/125/]) > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar >Assignee: Doğacan Güney > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch, > NutchBeanCreationSync_v2.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512702 ] Doğacan Güney commented on NUTCH-471: - Dennis, can you give some more details? AFAICS, searching works fine. I started tomcat then sent a query to search.jsp (with and without first requesting home page) and I didn't see any problems in both cases. > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar >Assignee: Doğacan Güney > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch, > NutchBeanCreationSync_v2.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NUTCH-471) Fix synchronization in NutchBean creation
[ https://issues.apache.org/jira/browse/NUTCH-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512712 ] Dennis Kubes commented on NUTCH-471: Ah, sorry, my configuration was the problem. If you don't upgrade the web.xml to include the listener: org.apache.nutch.searcher.NutchBean$NutchBeanConstructor then NutchBean returns null. I added a comment to the search.jsp to explain how NutchBean is initialized. > Fix synchronization in NutchBean creation > - > > Key: NUTCH-471 > URL: https://issues.apache.org/jira/browse/NUTCH-471 > Project: Nutch > Issue Type: Bug > Components: searcher >Affects Versions: 1.0.0 >Reporter: Enis Soztutar >Assignee: Doğacan Güney > Fix For: 1.0.0 > > Attachments: NutchBeanCreationSync_v1.patch, > NutchBeanCreationSync_v2.patch > > > NutchBean is created and then cached in servlet context. But > NutchBean.get(ServletContext app, Configuration conf) is not syncronized, > which causes more than one instance of the bean (and > DistributedSearch$Client) if servlet container is accessed rapidly during > startup. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.