NoteDb: Consider starred changes part of the Accounts table
A StarredChange is a simple pair of (Account.Id, Change.Id), and will ultimately be stored in NoteDb in the All-Users table. It turns out it is not even stored under the Change entity group in the googlesource.com backend, meaning among other things that starred changes can't be updated in the same transaction as a Change entity. Add a new value ACCOUNTS to the NoteDbTable enum and teach NotesMigration to understand this table. Note that in practice we've started migrating Accounts to All-Users without the use of NotesMigration, which is why we haven't done this yet. It's even possible that we will migrate StarredChanges in the same way, but that's a decision for later. This change is the minimal work necessary to stop considering StarredChanges part of the changes migration. Use the new migration bits within StarredChangesUtil. Remove support for starred changes from ChangeRebuilder (no longer applicable) and RebuildNoteDb (not implemented yet). Change-Id: I84fa8b78d308b7dcd6b7592cea8898a93135cd2c
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.server.notedb;
|
||||
|
||||
enum NoteDbTable {
|
||||
ACCOUNTS,
|
||||
CHANGES;
|
||||
|
||||
String key() {
|
||||
|
Reference in New Issue
Block a user