Remove AccountByEmailCache
With change I1c24da1378 there is a new Emails class that allows looking up accounts by email. To find accounts by email it gets external IDs by email from the ExternalIdCache and extracts the account IDs from the external IDs. This is exactly what AccountByEmailCacheImpl.Loader was doing. In addition the Emails class does an index lookup to also find accounts by preferred email (see commit message of change I1c24da1378 for an explanation of why this is needed). Change I991d21b1ac removed all usages of AccountByEmailCache by using the Emails class instead. Hence the AccountByEmailCache can be removed now. Change-Id: I3a4279f5abda7ff3f03268258bb1755ce528f0d4 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -23,7 +23,6 @@ import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.server.ReviewDb;
|
||||
import com.google.gerrit.server.Sequences;
|
||||
import com.google.gerrit.server.account.AccountByEmailCache;
|
||||
import com.google.gerrit.server.account.AccountCache;
|
||||
import com.google.gerrit.server.account.AccountsUpdate;
|
||||
import com.google.gerrit.server.account.VersionedAuthorizedKeys;
|
||||
@@ -60,7 +59,6 @@ public class AccountCreator {
|
||||
private final Provider<GroupsUpdate> groupsUpdateProvider;
|
||||
private final SshKeyCache sshKeyCache;
|
||||
private final AccountCache accountCache;
|
||||
private final AccountByEmailCache byEmailCache;
|
||||
private final ExternalIdsUpdate.Server externalIdsUpdate;
|
||||
private final boolean sshEnabled;
|
||||
|
||||
@@ -74,7 +72,6 @@ public class AccountCreator {
|
||||
@ServerInitiated Provider<GroupsUpdate> groupsUpdateProvider,
|
||||
SshKeyCache sshKeyCache,
|
||||
AccountCache accountCache,
|
||||
AccountByEmailCache byEmailCache,
|
||||
ExternalIdsUpdate.Server externalIdsUpdate,
|
||||
@SshEnabled boolean sshEnabled) {
|
||||
accounts = new HashMap<>();
|
||||
@@ -86,7 +83,6 @@ public class AccountCreator {
|
||||
this.groupsUpdateProvider = groupsUpdateProvider;
|
||||
this.sshKeyCache = sshKeyCache;
|
||||
this.accountCache = accountCache;
|
||||
this.byEmailCache = byEmailCache;
|
||||
this.externalIdsUpdate = externalIdsUpdate;
|
||||
this.sshEnabled = sshEnabled;
|
||||
}
|
||||
@@ -148,7 +144,6 @@ public class AccountCreator {
|
||||
if (username != null) {
|
||||
accountCache.evictByUsername(username);
|
||||
}
|
||||
byEmailCache.evict(email);
|
||||
|
||||
account = new TestAccount(id, username, email, fullName, sshKey, httpPass);
|
||||
if (username != null) {
|
||||
|
||||
Reference in New Issue
Block a user