mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-07-12 18:47:09 +00:00
copy to h3
Fix for [HER-1612] lock contention in BeanShellDecideRule/BeanShellProcessor occurs even if isolate-threads=true
* BeanShellDecideRule.java
(getInterpreter) add synchronization
(decisionFor) remove method synchronization; sync on interpreter/getInterpreter makes it a superfluous bottleneck
* BeanShellProcessor.java
(getInterpreter) add synchronization
(innerProcess) remove method synchronization; sync on interpreter/getInterpreter makes it a superfluous bottleneck
This commit is contained in:
@@ -110,7 +110,7 @@ public class BeanShellProcessor extends Processor {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized void innerProcess(ProcessorURI curi) {
|
||||
protected void innerProcess(ProcessorURI curi) {
|
||||
// depending on previous configuration, interpreter may
|
||||
// be local to this thread or shared
|
||||
Interpreter interpreter = getInterpreter();
|
||||
@@ -131,7 +131,7 @@ public class BeanShellProcessor extends Processor {
|
||||
* to this thread.
|
||||
* @return Interpreter to use
|
||||
*/
|
||||
protected Interpreter getInterpreter() {
|
||||
protected synchronized Interpreter getInterpreter() {
|
||||
if(sharedInterpreter==null
|
||||
&& getIsolateThreads()) {
|
||||
// initialize
|
||||
|
||||
@@ -104,7 +104,7 @@ implements ApplicationContextAware {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized DecideResult innerDecide(ProcessorURI uri) {
|
||||
public DecideResult innerDecide(ProcessorURI uri) {
|
||||
// depending on previous configuration, interpreter may
|
||||
// be local to this thread or shared
|
||||
Interpreter interpreter = getInterpreter();
|
||||
@@ -127,7 +127,7 @@ implements ApplicationContextAware {
|
||||
* to this thread.
|
||||
* @return Interpreter to use
|
||||
*/
|
||||
protected Interpreter getInterpreter() {
|
||||
protected synchronized Interpreter getInterpreter() {
|
||||
if(sharedInterpreter==null
|
||||
&& getIsolateThreads()) {
|
||||
// initialize
|
||||
|
||||
Reference in New Issue
Block a user