Log time that is spent on loading cache entries
Change-Id: I13c53228da3b2f5d2869406fe9568fc655d6d9b4 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -27,6 +27,8 @@ import com.google.gerrit.server.account.externalids.ExternalId;
|
|||||||
import com.google.gerrit.server.account.externalids.ExternalIds;
|
import com.google.gerrit.server.account.externalids.ExternalIds;
|
||||||
import com.google.gerrit.server.cache.CacheModule;
|
import com.google.gerrit.server.cache.CacheModule;
|
||||||
import com.google.gerrit.server.config.AllUsersName;
|
import com.google.gerrit.server.config.AllUsersName;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.gerrit.server.util.time.TimeUtil;
|
import com.google.gerrit.server.util.time.TimeUtil;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
@@ -181,8 +183,9 @@ public class AccountCacheImpl implements AccountCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<AccountState> load(Account.Id who) throws Exception {
|
public Optional<AccountState> load(Account.Id who) throws Exception {
|
||||||
logger.atFine().log("Loading account %s", who);
|
try (TraceTimer timer = TraceContext.newTimer("Loading account %s", who)) {
|
||||||
return accounts.get(who);
|
return accounts.get(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
|
|||||||
import com.google.gerrit.server.cache.CacheModule;
|
import com.google.gerrit.server.cache.CacheModule;
|
||||||
import com.google.gerrit.server.group.InternalGroup;
|
import com.google.gerrit.server.group.InternalGroup;
|
||||||
import com.google.gerrit.server.group.db.Groups;
|
import com.google.gerrit.server.group.db.Groups;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.gerrit.server.query.group.InternalGroupQuery;
|
import com.google.gerrit.server.query.group.InternalGroupQuery;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
@@ -147,10 +149,11 @@ public class GroupCacheImpl implements GroupCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<InternalGroup> load(AccountGroup.Id key) throws Exception {
|
public Optional<InternalGroup> load(AccountGroup.Id key) throws Exception {
|
||||||
logger.atFine().log("Loading group %s by ID", key);
|
try (TraceTimer timer = TraceContext.newTimer("Loading group %s by ID", key)) {
|
||||||
return groupQueryProvider.get().byId(key);
|
return groupQueryProvider.get().byId(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class ByNameLoader extends CacheLoader<String, Optional<InternalGroup>> {
|
static class ByNameLoader extends CacheLoader<String, Optional<InternalGroup>> {
|
||||||
private final Provider<InternalGroupQuery> groupQueryProvider;
|
private final Provider<InternalGroupQuery> groupQueryProvider;
|
||||||
@@ -162,10 +165,11 @@ public class GroupCacheImpl implements GroupCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<InternalGroup> load(String name) throws Exception {
|
public Optional<InternalGroup> load(String name) throws Exception {
|
||||||
logger.atFine().log("Loading group '%s' by name", name);
|
try (TraceTimer timer = TraceContext.newTimer("Loading group '%s' by name", name)) {
|
||||||
return groupQueryProvider.get().byName(new AccountGroup.NameKey(name));
|
return groupQueryProvider.get().byName(new AccountGroup.NameKey(name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class ByUUIDLoader extends CacheLoader<String, Optional<InternalGroup>> {
|
static class ByUUIDLoader extends CacheLoader<String, Optional<InternalGroup>> {
|
||||||
private final Groups groups;
|
private final Groups groups;
|
||||||
@@ -177,8 +181,9 @@ public class GroupCacheImpl implements GroupCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<InternalGroup> load(String uuid) throws Exception {
|
public Optional<InternalGroup> load(String uuid) throws Exception {
|
||||||
logger.atFine().log("Loading group %s by UUID", uuid);
|
try (TraceTimer timer = TraceContext.newTimer("Loading group %s by UUID", uuid)) {
|
||||||
return groups.getGroup(new AccountGroup.UUID(uuid));
|
return groups.getGroup(new AccountGroup.UUID(uuid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
|
|||||||
import com.google.gerrit.server.cache.CacheModule;
|
import com.google.gerrit.server.cache.CacheModule;
|
||||||
import com.google.gerrit.server.group.InternalGroup;
|
import com.google.gerrit.server.group.InternalGroup;
|
||||||
import com.google.gerrit.server.group.db.Groups;
|
import com.google.gerrit.server.group.db.Groups;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.gerrit.server.query.group.InternalGroupQuery;
|
import com.google.gerrit.server.query.group.InternalGroupQuery;
|
||||||
import com.google.gwtorm.server.OrmException;
|
import com.google.gwtorm.server.OrmException;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
@@ -151,7 +153,7 @@ public class GroupIncludeCacheImpl implements GroupIncludeCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImmutableSet<AccountGroup.UUID> load(Account.Id memberId) throws OrmException {
|
public ImmutableSet<AccountGroup.UUID> load(Account.Id memberId) throws OrmException {
|
||||||
logger.atFine().log("Loading groups with member %s", memberId);
|
try (TraceTimer timer = TraceContext.newTimer("Loading groups with member %s", memberId)) {
|
||||||
return groupQueryProvider
|
return groupQueryProvider
|
||||||
.get()
|
.get()
|
||||||
.byMember(memberId)
|
.byMember(memberId)
|
||||||
@@ -160,6 +162,7 @@ public class GroupIncludeCacheImpl implements GroupIncludeCache {
|
|||||||
.collect(toImmutableSet());
|
.collect(toImmutableSet());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class ParentGroupsLoader
|
static class ParentGroupsLoader
|
||||||
extends CacheLoader<AccountGroup.UUID, ImmutableList<AccountGroup.UUID>> {
|
extends CacheLoader<AccountGroup.UUID, ImmutableList<AccountGroup.UUID>> {
|
||||||
@@ -172,7 +175,7 @@ public class GroupIncludeCacheImpl implements GroupIncludeCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImmutableList<AccountGroup.UUID> load(AccountGroup.UUID key) throws OrmException {
|
public ImmutableList<AccountGroup.UUID> load(AccountGroup.UUID key) throws OrmException {
|
||||||
logger.atFine().log("Loading parent groups of %s", key);
|
try (TraceTimer timer = TraceContext.newTimer("Loading parent groups of %s", key)) {
|
||||||
return groupQueryProvider
|
return groupQueryProvider
|
||||||
.get()
|
.get()
|
||||||
.bySubgroup(key)
|
.bySubgroup(key)
|
||||||
@@ -181,6 +184,7 @@ public class GroupIncludeCacheImpl implements GroupIncludeCache {
|
|||||||
.collect(toImmutableList());
|
.collect(toImmutableList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class AllExternalLoader extends CacheLoader<String, ImmutableList<AccountGroup.UUID>> {
|
static class AllExternalLoader extends CacheLoader<String, ImmutableList<AccountGroup.UUID>> {
|
||||||
private final Groups groups;
|
private final Groups groups;
|
||||||
@@ -192,8 +196,9 @@ public class GroupIncludeCacheImpl implements GroupIncludeCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImmutableList<AccountGroup.UUID> load(String key) throws Exception {
|
public ImmutableList<AccountGroup.UUID> load(String key) throws Exception {
|
||||||
logger.atFine().log("Loading all external groups");
|
try (TraceTimer timer = TraceContext.newTimer("Loading all external groups")) {
|
||||||
return groups.getExternalGroups().collect(toImmutableList());
|
return groups.getExternalGroups().collect(toImmutableList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import com.google.common.collect.MultimapBuilder;
|
|||||||
import com.google.common.collect.SetMultimap;
|
import com.google.common.collect.SetMultimap;
|
||||||
import com.google.common.flogger.FluentLogger;
|
import com.google.common.flogger.FluentLogger;
|
||||||
import com.google.gerrit.reviewdb.client.Account;
|
import com.google.gerrit.reviewdb.client.Account;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
import com.google.inject.name.Named;
|
import com.google.inject.name.Named;
|
||||||
@@ -150,10 +152,12 @@ class ExternalIdCacheImpl implements ExternalIdCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AllExternalIds load(ObjectId notesRev) throws Exception {
|
public AllExternalIds load(ObjectId notesRev) throws Exception {
|
||||||
logger.atFine().log("Loading external IDs (revision=%s)", notesRev);
|
try (TraceTimer timer =
|
||||||
|
TraceContext.newTimer("Loading external IDs (revision=%s)", notesRev)) {
|
||||||
ImmutableSet<ExternalId> externalIds = externalIdReader.all(notesRev);
|
ImmutableSet<ExternalId> externalIds = externalIdReader.all(notesRev);
|
||||||
externalIds.forEach(ExternalId::checkThatBlobIdIsSet);
|
externalIds.forEach(ExternalId::checkThatBlobIdIsSet);
|
||||||
return AllExternalIds.create(externalIds);
|
return AllExternalIds.create(externalIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ import com.google.gerrit.server.auth.AuthenticationUnavailableException;
|
|||||||
import com.google.gerrit.server.auth.NoSuchUserException;
|
import com.google.gerrit.server.auth.NoSuchUserException;
|
||||||
import com.google.gerrit.server.config.AuthConfig;
|
import com.google.gerrit.server.config.AuthConfig;
|
||||||
import com.google.gerrit.server.config.GerritServerConfig;
|
import com.google.gerrit.server.config.GerritServerConfig;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
import com.google.inject.name.Named;
|
import com.google.inject.name.Named;
|
||||||
@@ -351,12 +353,13 @@ class LdapRealm extends AbstractRealm {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<Account.Id> load(String username) throws Exception {
|
public Optional<Account.Id> load(String username) throws Exception {
|
||||||
logger.atFine().log("Loading account for username %s", username);
|
try (TraceTimer timer = TraceContext.newTimer("Loading account for username %s", username)) {
|
||||||
return externalIds
|
return externalIds
|
||||||
.get(ExternalId.Key.create(SCHEME_GERRIT, username))
|
.get(ExternalId.Key.create(SCHEME_GERRIT, username))
|
||||||
.map(ExternalId::accountId);
|
.map(ExternalId::accountId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class MemberLoader extends CacheLoader<String, Set<AccountGroup.UUID>> {
|
static class MemberLoader extends CacheLoader<String, Set<AccountGroup.UUID>> {
|
||||||
private final Helper helper;
|
private final Helper helper;
|
||||||
@@ -368,7 +371,8 @@ class LdapRealm extends AbstractRealm {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<AccountGroup.UUID> load(String username) throws Exception {
|
public Set<AccountGroup.UUID> load(String username) throws Exception {
|
||||||
logger.atFine().log("Loading group for member with username %s", username);
|
try (TraceTimer timer =
|
||||||
|
TraceContext.newTimer("Loading group for member with username %s", username)) {
|
||||||
final DirContext ctx = helper.open();
|
final DirContext ctx = helper.open();
|
||||||
try {
|
try {
|
||||||
return helper.queryForGroups(ctx, username, null);
|
return helper.queryForGroups(ctx, username, null);
|
||||||
@@ -377,6 +381,7 @@ class LdapRealm extends AbstractRealm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class ExistenceLoader extends CacheLoader<String, Boolean> {
|
static class ExistenceLoader extends CacheLoader<String, Boolean> {
|
||||||
private final Helper helper;
|
private final Helper helper;
|
||||||
@@ -388,7 +393,7 @@ class LdapRealm extends AbstractRealm {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean load(String groupDn) throws Exception {
|
public Boolean load(String groupDn) throws Exception {
|
||||||
logger.atFine().log("Loading groupDn %s", groupDn);
|
try (TraceTimer timer = TraceContext.newTimer("Loading groupDn %s", groupDn)) {
|
||||||
final DirContext ctx = helper.open();
|
final DirContext ctx = helper.open();
|
||||||
try {
|
try {
|
||||||
Name compositeGroupName = new CompositeName().add(groupDn);
|
Name compositeGroupName = new CompositeName().add(groupDn);
|
||||||
@@ -403,4 +408,5 @@ class LdapRealm extends AbstractRealm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import com.google.common.hash.BloomFilter;
|
|||||||
import com.google.gerrit.common.Nullable;
|
import com.google.gerrit.common.Nullable;
|
||||||
import com.google.gerrit.server.cache.PersistentCache;
|
import com.google.gerrit.server.cache.PersistentCache;
|
||||||
import com.google.gerrit.server.cache.serialize.CacheSerializer;
|
import com.google.gerrit.server.cache.serialize.CacheSerializer;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.gerrit.server.util.time.TimeUtil;
|
import com.google.gerrit.server.util.time.TimeUtil;
|
||||||
import com.google.inject.TypeLiteral;
|
import com.google.inject.TypeLiteral;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -235,8 +237,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> implements Per
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueHolder<V> load(K key) throws Exception {
|
public ValueHolder<V> load(K key) throws Exception {
|
||||||
logger.atFine().log("Loading value for %s from cache", key);
|
try (TraceTimer timer = TraceContext.newTimer("Loading value for %s from cache", key)) {
|
||||||
|
|
||||||
if (store.mightContain(key)) {
|
if (store.mightContain(key)) {
|
||||||
ValueHolder<V> h = store.getIfPresent(key);
|
ValueHolder<V> h = store.getIfPresent(key);
|
||||||
if (h != null) {
|
if (h != null) {
|
||||||
@@ -250,6 +251,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> implements Per
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class SqlStore<K, V> {
|
static class SqlStore<K, V> {
|
||||||
private final String url;
|
private final String url;
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import com.google.gerrit.reviewdb.server.ReviewDb;
|
|||||||
import com.google.gerrit.server.ReviewerSet;
|
import com.google.gerrit.server.ReviewerSet;
|
||||||
import com.google.gerrit.server.cache.CacheModule;
|
import com.google.gerrit.server.cache.CacheModule;
|
||||||
import com.google.gerrit.server.index.change.ChangeField;
|
import com.google.gerrit.server.index.change.ChangeField;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.gerrit.server.query.change.ChangeData;
|
import com.google.gerrit.server.query.change.ChangeData;
|
||||||
import com.google.gerrit.server.query.change.InternalChangeQuery;
|
import com.google.gerrit.server.query.change.InternalChangeQuery;
|
||||||
import com.google.gerrit.server.util.ManualRequestContext;
|
import com.google.gerrit.server.util.ManualRequestContext;
|
||||||
@@ -144,8 +146,8 @@ public class SearchingChangeCacheImpl implements GitReferenceUpdatedListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CachedChange> load(Project.NameKey key) throws Exception {
|
public List<CachedChange> load(Project.NameKey key) throws Exception {
|
||||||
logger.atFine().log("Loading changes of project %s", key);
|
try (TraceTimer timer = TraceContext.newTimer("Loading changes of project %s", key);
|
||||||
try (ManualRequestContext ctx = requestContext.open()) {
|
ManualRequestContext ctx = requestContext.open()) {
|
||||||
List<ChangeData> cds =
|
List<ChangeData> cds =
|
||||||
queryProvider
|
queryProvider
|
||||||
.get()
|
.get()
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ import com.google.gerrit.server.cache.CacheModule;
|
|||||||
import com.google.gerrit.server.config.AllProjectsName;
|
import com.google.gerrit.server.config.AllProjectsName;
|
||||||
import com.google.gerrit.server.config.AllUsersName;
|
import com.google.gerrit.server.config.AllUsersName;
|
||||||
import com.google.gerrit.server.git.GitRepositoryManager;
|
import com.google.gerrit.server.git.GitRepositoryManager;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
||||||
@@ -270,7 +272,7 @@ public class ProjectCacheImpl implements ProjectCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProjectState load(String projectName) throws Exception {
|
public ProjectState load(String projectName) throws Exception {
|
||||||
logger.atFine().log("Loading project %s", projectName);
|
try (TraceTimer timer = TraceContext.newTimer("Loading project %s", projectName)) {
|
||||||
long now = clock.read();
|
long now = clock.read();
|
||||||
Project.NameKey key = new Project.NameKey(projectName);
|
Project.NameKey key = new Project.NameKey(projectName);
|
||||||
try (Repository git = mgr.openRepository(key)) {
|
try (Repository git = mgr.openRepository(key)) {
|
||||||
@@ -283,6 +285,7 @@ public class ProjectCacheImpl implements ProjectCache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static class ListKey {
|
static class ListKey {
|
||||||
static final ListKey ALL = new ListKey();
|
static final ListKey ALL = new ListKey();
|
||||||
@@ -300,8 +303,9 @@ public class ProjectCacheImpl implements ProjectCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImmutableSortedSet<Project.NameKey> load(ListKey key) throws Exception {
|
public ImmutableSortedSet<Project.NameKey> load(ListKey key) throws Exception {
|
||||||
logger.atFine().log("Loading project list");
|
try (TraceTimer timer = TraceContext.newTimer("Loading project list")) {
|
||||||
return ImmutableSortedSet.copyOf(mgr.list());
|
return ImmutableSortedSet.copyOf(mgr.list());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import com.google.gerrit.server.account.VersionedAuthorizedKeys;
|
|||||||
import com.google.gerrit.server.account.externalids.ExternalId;
|
import com.google.gerrit.server.account.externalids.ExternalId;
|
||||||
import com.google.gerrit.server.account.externalids.ExternalIds;
|
import com.google.gerrit.server.account.externalids.ExternalIds;
|
||||||
import com.google.gerrit.server.cache.CacheModule;
|
import com.google.gerrit.server.cache.CacheModule;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext;
|
||||||
|
import com.google.gerrit.server.logging.TraceContext.TraceTimer;
|
||||||
import com.google.gerrit.server.ssh.SshKeyCache;
|
import com.google.gerrit.server.ssh.SshKeyCache;
|
||||||
import com.google.gerrit.server.ssh.SshKeyCreator;
|
import com.google.gerrit.server.ssh.SshKeyCreator;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
@@ -103,9 +105,10 @@ public class SshKeyCacheImpl implements SshKeyCache {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<SshKeyCacheEntry> load(String username) throws Exception {
|
public Iterable<SshKeyCacheEntry> load(String username) throws Exception {
|
||||||
logger.atFine().log("Loading SSH keys for account with username %s", username);
|
try (TraceTimer timer =
|
||||||
|
TraceContext.newTimer("Loading SSH keys for account with username %s", username)) {
|
||||||
Optional<ExternalId> user = externalIds.get(ExternalId.Key.create(SCHEME_USERNAME, username));
|
Optional<ExternalId> user =
|
||||||
|
externalIds.get(ExternalId.Key.create(SCHEME_USERNAME, username));
|
||||||
if (!user.isPresent()) {
|
if (!user.isPresent()) {
|
||||||
return NO_SUCH_USER;
|
return NO_SUCH_USER;
|
||||||
}
|
}
|
||||||
@@ -122,6 +125,7 @@ public class SshKeyCacheImpl implements SshKeyCache {
|
|||||||
}
|
}
|
||||||
return Collections.unmodifiableList(kl);
|
return Collections.unmodifiableList(kl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void add(List<SshKeyCacheEntry> kl, AccountSshKey k) {
|
private void add(List<SshKeyCacheEntry> kl, AccountSshKey k) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user