@@ -164,7 +164,7 @@ private void importReadsets() throws PipelineJobException
164164 Set <Integer > fileIdsWithExistingMetrics = new HashSet <>();
165165 try (DbScope .Transaction transaction = schema .getScope ().ensureTransaction ())
166166 {
167- Set <Integer > readsetsToDeactivate = new HashSet <>();
167+ Map <Integer , String > readsetsToDeactivate = new HashMap <>();
168168 TableInfo readsetTable = schema .getTable (SequenceAnalysisSchema .TABLE_READSETS );
169169 TableInfo readDataTable = schema .getTable (SequenceAnalysisSchema .TABLE_READ_DATA );
170170
@@ -177,7 +177,7 @@ private void importReadsets() throws PipelineJobException
177177 List <ReadDataImpl > preexistingReadData ;
178178 if (readsetExists )
179179 {
180- readsetsToDeactivate .add (r .getReadsetId ());
180+ readsetsToDeactivate .put (r .getReadsetId (), r . getContainer ());
181181 preexistingReadData = ((SequenceReadsetImpl )SequenceAnalysisService .get ().getReadset (r .getReadsetId (), getJob ().getUser ())).getReadDataImpl ();
182182 }
183183 else
@@ -437,14 +437,15 @@ private void importReadsets() throws PipelineJobException
437437 getJob ().getLogger ().info ("Setting " + readsetsToDeactivate .size () + " readsets to status=replaced" );
438438 List <Map <String , Object >> toUpdate = new ArrayList <>();
439439 List <Map <String , Object >> toUpdateKeys = new ArrayList <>();
440- readsetsToDeactivate .forEach (rs -> {
440+ readsetsToDeactivate .forEach (( rowId , container ) -> {
441441 Map <String , Object > row = new CaseInsensitiveHashMap <>();
442- row .put ("rowid" , rs );
442+ row .put ("rowid" , rowId );
443+ row .put ("container" , container );
443444 row .put ("status" , "Replaced" );
444445 toUpdate .add (row );
445446
446447 row = new CaseInsensitiveHashMap <>();
447- row .put ("rowid" , rs );
448+ row .put ("rowid" , rowId );
448449 toUpdateKeys .add (row );
449450 });
450451
0 commit comments