Extract tr: values from commit instead of database
Instead of loading tracking ids first to the SQL database and then to the secondary index, extract ids from the commit message. This allows an administrator to update the tracking id configuration and run just `java -jar gerrit.war reindex`, without first needing to execute the older ScanTrackingIds program. In 2.9 it should be possible to delete ScanTrackingIds. Change-Id: I56428074461869db6c8dd195cb5a1b689286b114
This commit is contained in:
@@ -22,7 +22,6 @@ import com.google.gerrit.reviewdb.client.ChangeMessage;
|
||||
import com.google.gerrit.reviewdb.client.PatchLineComment;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gerrit.reviewdb.client.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.client.TrackingId;
|
||||
import com.google.gerrit.server.ChangeUtil;
|
||||
import com.google.gerrit.server.query.change.ChangeData;
|
||||
import com.google.gerrit.server.query.change.ChangeQueryBuilder;
|
||||
@@ -220,11 +219,12 @@ public class ChangeField {
|
||||
@Override
|
||||
public Iterable<String> get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
Set<String> r = Sets.newHashSet();
|
||||
for (TrackingId id : input.trackingIds(args.db)) {
|
||||
r.add(id.getTrackingId());
|
||||
try {
|
||||
return args.trackingFooters.extract(
|
||||
input.commitFooters(args.repoManager, args.db));
|
||||
} catch (IOException e) {
|
||||
throw new OrmException(e);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user