Skip to content

Commit

Permalink
Uncache all entities during OAI indexing to reduce memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
toniprieto committed Dec 22, 2024
1 parent 5610412 commit 9af2e2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dspace-oai/src/main/java/org/dspace/xoai/app/XOAI.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ private int index(Iterator<Item> iterator) throws DSpaceSolrIndexerException {
server.add(list);
server.commit();
list.clear();
try {
context.uncacheEntities();
} catch (SQLException ex) {
log.error("Error uncaching entities", ex);
}
}
}
System.out.println("Total: " + i + " items");
Expand Down

0 comments on commit 9af2e2e

Please sign in to comment.