Skip to content

Commit

Permalink
Getting dependency-data should not need to hold the whole dataset in …
Browse files Browse the repository at this point in the history
…memory twice.
  • Loading branch information
jannistsiroyannis committed Jan 31, 2025
1 parent 2d0e1eb commit 4989e1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ class DatasetImporter {

private boolean remove(String id, boolean force) {
try {
log.info("Removing " + id + " from dataset")
whelk.remove(id, "xl", null, force)
return true
} catch ( RuntimeException re ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,9 @@ class PostgreSQLComponent {

String replacement = "'" + excludeRelations.join("', '") + "'"
query = query.replace("", replacement)
connection.setAutoCommit(false)
preparedStatement = connection.prepareStatement(query)
preparedStatement.setFetchSize(256)
preparedStatement.setString(1, id)
rs = preparedStatement.executeQuery()
List<Tuple2<String, String>> dependencies = []
Expand Down

0 comments on commit 4989e1a

Please sign in to comment.