Materialize IdentifiedUser deps in BatchUpdate
When executing BatchUpdates from a receive commit, materialise the user dependent objects so that it can be passed over to other threads for delayed execution outside the current scope. P.S. This fixes Gerrit master breakages caused by OutOfScopeException. Change-Id: Ic463ddaeb5d9c90573a3a4639523f214125aaaad
This commit is contained in:
@@ -825,8 +825,9 @@ public class ReceiveCommits {
|
||||
return;
|
||||
}
|
||||
|
||||
try (BatchUpdate bu = batchUpdateFactory.create(db,
|
||||
magicBranch.dest.getParentKey(), user, TimeUtil.nowTs());
|
||||
try (BatchUpdate bu =
|
||||
batchUpdateFactory.create(db, magicBranch.dest.getParentKey(),
|
||||
user.materializedCopy(), TimeUtil.nowTs());
|
||||
ObjectInserter ins = repo.newObjectInserter()) {
|
||||
bu.setRepository(repo, rp.getRevWalk(), ins)
|
||||
.updateChangesInParallel();
|
||||
|
||||
Reference in New Issue
Block a user