Remove support for reading accounts from ReviewDb
Accounts have been fully migrated to NoteDb. However inside of Google we still have code that depends on having all accounts in the Accounts table. This means we must still write account updates to the Accounts table. On the other hand also for us Gerrit server is always reading the accounts from NoteDb. This means the code for reading accounts from ReviewDb can be removed already now. This is why removing the support for accounts in ReviewDb is done in 2 parts: 1. remove support for reading accounts from ReviewDb (this change) 2. remove support for writing accounts to ReviewDb (follow-up change) Change-Id: Id51a0504635de30f95205ec76d51e2be8ff6f462 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -239,9 +239,9 @@ class BecomeAnyAccountLoginServlet extends HttpServlet {
|
||||
} catch (NumberFormatException nfe) {
|
||||
return null;
|
||||
}
|
||||
try (ReviewDb db = schema.open()) {
|
||||
return auth(accounts.get(db, id));
|
||||
} catch (OrmException | IOException | ConfigInvalidException e) {
|
||||
try {
|
||||
return auth(accounts.get(id));
|
||||
} catch (IOException | ConfigInvalidException e) {
|
||||
getServletContext().log("cannot query database", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user