Skip to content

Commit 6199e6c

Browse files
committed
fix merge and put back index fix
1 parent 75f9711 commit 6199e6c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

experiment/src/client/test/integration/DataClassCrud.ispec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ describe('Import with update / merge', () => {
233233
it ("Issue 52922: Blank sample id in the file are getting ignored in update from file", async () => {
234234
const BLANK_KEY_UPDATE_ERROR_NO_EXPRESSION = 'Missing value for required property: Name';
235235
const BLANK_KEY_UPDATE_ERROR_WITH_EXPRESSION = 'Name value not provided on row ';
236-
const BOGUS_KEY_UPDATE_ERROR = 'Data not found: ';
236+
const BOGUS_KEY_UPDATE_ERROR = 'Data not found for ';
237237
const DUPLICATE_KEY_ERROR = 'duplicate key value';
238238

239239
const dataType = "NoExpressionNameRequired52922";

experiment/src/org/labkey/experiment/api/SampleTypeServiceImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
import java.util.Optional;
137137
import java.util.Set;
138138
import java.util.SortedSet;
139+
import java.util.TreeMap;
139140
import java.util.TreeSet;
140141
import java.util.function.Function;
141142
import java.util.function.Predicate;
@@ -1718,7 +1719,7 @@ private Map<Integer, Pair<Integer, String>> getSampleAliquotCounts(Collection<In
17181719
.append(")-1 AS CreatedAliquotCount FROM exp.material AS m WHERE m.rowid\s");
17191720
dialect.appendInClauseSql(sql, sampleIds);
17201721

1721-
Map<Integer, Pair<Integer, String>> sampleAliquotCounts = new HashMap<>();
1722+
Map<Integer, Pair<Integer, String>> sampleAliquotCounts = new TreeMap<>(); // Order sample by rowId to reduce probability of deadlock with search indexer
17221723
try (ResultSet rs = new SqlSelector(dbSchema, sql).getResultSet())
17231724
{
17241725
while (rs.next())
@@ -1779,7 +1780,7 @@ SELECT RootMaterialRowId as rootRowId, COUNT(*) as aliquotCount
17791780
}
17801781
dialect.appendInClauseSql(sql, sampleIds);
17811782

1782-
Map<Integer, Pair<Integer, String>> sampleAliquotCounts = new HashMap<>();
1783+
Map<Integer, Pair<Integer, String>> sampleAliquotCounts = new TreeMap<>(); // Order by rowId to reduce deadlock with search indexer
17831784
try (ResultSet rs = new SqlSelector(dbSchema, sql).getResultSet())
17841785
{
17851786
while (rs.next())

0 commit comments

Comments
 (0)