Navigation Menu

Skip to content

Commit

Permalink
0001305: Possible lock up during extraction. If the max number of loc…
Browse files Browse the repository at this point in the history
…ks are reached on a batch the extract method can hang forever
  • Loading branch information
chenson42 committed Jul 1, 2013
1 parent d9aaf3f commit 9c56589
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -126,7 +126,7 @@ public class DataExtractorService extends AbstractService implements IDataExtrac

private IStagingManager stagingManager;

private Map<Long, Semaphore> locks = new HashMap<Long, Semaphore>();
private Map<String, Semaphore> locks = new HashMap<String, Semaphore>();

public DataExtractorService(IParameterService parameterService,
ISymmetricDialect symmetricDialect, IOutgoingBatchService outgoingBatchService,
Expand Down Expand Up @@ -558,7 +558,7 @@ public OutgoingBatch extractOutgoingBatch(ProcessInfo processInfo, Node targetNo
lock = locks.get(semaphoreKey);
if (lock == null) {
lock = new Semaphore(maxPermits);
locks.put(currentBatch.getBatchId(), lock);
locks.put(semaphoreKey, lock);
}
try {
lock.acquire();
Expand Down

0 comments on commit 9c56589

Please sign in to comment.