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
This commit is contained in:
David Ostrovsky
2016-10-18 23:29:29 +02:00
parent 6147f6d17b
commit 79ae5803be

View File

@@ -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);
}