Commit c0042d13 authored by Matija Obreza's avatar Matija Obreza
Browse files

Avoid database locking entire table on index scan

parent 6116504f
......@@ -532,7 +532,9 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
@Override
@Transactional(readOnly = false)
public void updateAccessionCount(FaoInstitute institute) {
instituteRepository.updateInstituteAccessionCount(institute);
long accessionCount = accessionRepository.countByInstitute(institute);
institute.setAccessionCount(accessionCount);
instituteRepository.save(institute);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment