memory leak, where the Resource Pool was releasing based on the value and not the key, resulting in the resourceAssignments map growing with each additional shard
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1880 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
761a730758
commit
d21b582b18
|
|
@ -79,8 +79,11 @@ abstract class ResourcePool <T,I extends Iterator> {
|
|||
synchronized(this) {
|
||||
// Find and remove the resource from the list of allocated resources.
|
||||
T resource = resourceAssignments.get( iterator );
|
||||
resourceAssignments.remove(resource);
|
||||
Object obj = resourceAssignments.remove(iterator);
|
||||
|
||||
// make sure we actually removed the assignment
|
||||
if (obj == null)
|
||||
throw new StingException("Failed to remove resource assignment; target key had no associated value in the resource assignment map");
|
||||
// Return the resource to the pool.
|
||||
if( !allResources.contains(resource) )
|
||||
throw new StingException("Iterator does not belong to the given pool.");
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package org.broadinstitute.sting.gatk.traversals;
|
|||
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.WalkerManager;
|
||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||
import org.broadinstitute.sting.gatk.datasources.providers.ReadReferenceView;
|
||||
import org.broadinstitute.sting.gatk.datasources.providers.ReadView;
|
||||
import org.broadinstitute.sting.gatk.datasources.providers.ShardDataProvider;
|
||||
|
|
@ -16,7 +16,6 @@ import org.broadinstitute.sting.gatk.walkers.Walker;
|
|||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/*
|
||||
|
|
@ -53,9 +52,7 @@ import java.util.Arrays;
|
|||
* <p/>
|
||||
* This class handles traversing by reads in the new shardable style
|
||||
*/
|
||||
public class TraverseReads extends TraversalEngine {
|
||||
final ArrayList<String> x = new ArrayList<String>();
|
||||
|
||||
public class TraverseReads extends TraversalEngine {
|
||||
/** our log, which we want to capture anything from this class */
|
||||
protected static Logger logger = Logger.getLogger(TraverseReads.class);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue