MergeabilityCacheImpl: Fix leak of repo handles
We were failing to clear the LoadHelper (including repo) from the key in the fast path where we assume changes are mergeable into a new branch. Change-Id: I7fc8fa8459fbc43bebf0f0f0d5d69224bef7d93a
This commit is contained in:
parent
596174ec50
commit
75129a2d53
@ -220,10 +220,10 @@ public class MergeabilityCacheImpl implements MergeabilityCache {
|
||||
public Boolean load(EntryKey key)
|
||||
throws NoSuchProjectException, MergeException, IOException {
|
||||
checkArgument(key.load != null, "Key cannot be loaded: %s", key);
|
||||
if (key.into.equals(ObjectId.zeroId())) {
|
||||
return true; // Assume yes on new branch.
|
||||
}
|
||||
try {
|
||||
if (key.into.equals(ObjectId.zeroId())) {
|
||||
return true; // Assume yes on new branch.
|
||||
}
|
||||
RefDatabase refDatabase = key.load.repo.getRefDatabase();
|
||||
Iterable<Ref> refs = Iterables.concat(
|
||||
refDatabase.getRefs(Constants.R_HEADS).values(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user