Skip to content

Commit

Permalink
0001578: Jobs can lock up if jobs.synchronized.enable is on and routi…
Browse files Browse the repository at this point in the history
…ng.peek.ahead.window.after.max.size is smaller then data rows
  • Loading branch information
chenson42 committed Feb 14, 2014
1 parent b4c321e commit 973b061
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -85,7 +85,12 @@ public DataGapRouteReader(ChannelRouterContext context, ISymmetricEngine engine)
this.peekAheadCount = parameterService.getInt(ParameterConstants.ROUTING_PEEK_AHEAD_WINDOW);
this.takeTimeout = engine.getParameterService().getInt(
ParameterConstants.ROUTING_WAIT_FOR_DATA_TIMEOUT_SECONDS, 330);
this.dataQueue = new LinkedBlockingQueue<Data>(peekAheadCount);
if (parameterService.is(ParameterConstants.SYNCHRONIZE_ALL_JOBS)) {
/* there will not be a separate thread to read a blocked queue so make sure the queue is big enough that it can be filled */
this.dataQueue = new LinkedBlockingQueue<Data>();
} else {
this.dataQueue = new LinkedBlockingQueue<Data>(peekAheadCount);
}
this.context = context;

String engineName = parameterService.getEngineName();
Expand Down

0 comments on commit 973b061

Please sign in to comment.