Skip to content

Commit

Permalink
Fix OOM for iterative tasks (MID-4959, MID-4615)
Browse files Browse the repository at this point in the history
Model.searchObjectsIterative used thread-local repository cache.
Not completely wrong but when iterating through too many objects
the cache gets filled in. (And the data in it could get quite obsolete.)
  • Loading branch information
mederly committed Nov 5, 2018
1 parent 9943fd8 commit 62fdf83
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1107,7 +1107,7 @@ public <T extends ObjectType> SearchResultMetadata searchObjectsIterative(Class<

SearchResultMetadata metadata;
try {
RepositoryCache.enter();
// Intentionally avoiding entering repo cache (MID-4959, MID-4615)
logQuery(query);

try {
Expand All @@ -1128,7 +1128,7 @@ public <T extends ObjectType> SearchResultMetadata searchObjectsIterative(Class<
}
}
} finally {
RepositoryCache.exit();
// Intentionally avoiding exiting repo cache
}

return metadata;
Expand Down

0 comments on commit 62fdf83

Please sign in to comment.