From 79ae5803bee893bf8f6fae2f17aa6b7dc4e67bb1 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Tue, 18 Oct 2016 23:29:29 +0200 Subject: [PATCH] Account Index: Force reindexing on user creation The approach to reindex the account index on mutation operation in I05894c88 was replaced by the different approach to reindex on cache eviction: I025cabc9. However, given that on user creation operation there is no eviction invocation, no reindexing happens, and as the result, on logout/login sequence, user is not found by 'external_id' predicate and as consequence every time new account was created. The problem is only triggered for new created accounts, after the migration to 2.13 release, because the old accounts were reindexed during the migration. All new created users after the migration are suffering from this bug. Change-Id: I35ff1f5052b46d2152598fa6bce63f6eb0ea61be --- .../java/com/google/gerrit/server/account/AccountManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java index 9cbd1b00bd..e32795f67b 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/AccountManager.java @@ -308,6 +308,7 @@ public class AccountManager { } byEmailCache.evict(account.getPreferredEmail()); + byIdCache.evict(account.getId()); realm.onCreateAccount(who, account); return new AuthResult(newId, extId.getKey(), true); }