[
https://issues.apache.org/jira/browse/NUTCH-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379895#comment-14379895
]
Sebastian Nagel commented on NUTCH-1941:
----------------------------------------
It's not about concurrent write accesses to the counter, it's about whether
visibility of the variable values (cf.
[[1|http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html]]): each
thread may have a copy of urlCount and userAgent in it's local CPU cache or
register. If one thread assigns a new agent name to userAgent, that's not
necessarily seen by other threads. If we are pessimistic :) but want to
guarantee that within a thread the agent name is "rolled" we cannot cope
without synchronization.
> Optional rolling http.agent.name's
> ----------------------------------
>
> Key: NUTCH-1941
> URL: https://issues.apache.org/jira/browse/NUTCH-1941
> Project: Nutch
> Issue Type: New Feature
> Components: fetcher, protocol
> Reporter: Lewis John McGibbney
> Priority: Trivial
> Attachments: NUTCH-1941-ITR2.patch, NUTCH-1941-itr3.patch,
> NUTCH-1941-ver1.patch, agent.names.txt, nutch.patch
>
>
> In some scenarios, even whilst adhering to fetcher.crawl.delay, web admins
> can block your fetcher based merely on your crawler name.
> I propose the ability to implement rolling http.agent.name's which could be
> substituted every 5 seconds for example. This would mean that successive
> requests to the same domain would be sent with different http.agent.name.
> This behavior should be off by default.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)