Remove ability to read and write assignee.

This is part of the series of changes removing assignee functionality.

We keep CommitRewriter to be able to rewrite databases written by older
versions. But remove assertions in the tests that require ChangeNotes
api calls

Forward-Compatible: checked
Google-Bug-Id: b/267456422
Release-Notes: skip
Change-Id: I37ed3e5b64695bfe340c91d5556072162965e2ee
diff --git a/java/com/google/gerrit/server/AssigneeStatusUpdate.java b/java/com/google/gerrit/server/AssigneeStatusUpdate.java
deleted file mode 100644
index 812aad1..0000000
--- a/java/com/google/gerrit/server/AssigneeStatusUpdate.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2019 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.server;
-
-import com.google.auto.value.AutoValue;
-import com.google.gerrit.entities.Account;
-import java.time.Instant;
-import java.util.Optional;
-
-/** Change to an assignee's status. */
-@AutoValue
-public abstract class AssigneeStatusUpdate {
-  public static AssigneeStatusUpdate create(
-      Instant ts, Account.Id updatedBy, Optional<Account.Id> currentAssignee) {
-    return new AutoValue_AssigneeStatusUpdate(ts, updatedBy, currentAssignee);
-  }
-
-  public abstract Instant date();
-
-  public abstract Account.Id updatedBy();
-
-  public abstract Optional<Account.Id> currentAssignee();
-}
diff --git a/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java b/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java
index 771d72b..3be55ea 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java
@@ -19,7 +19,6 @@
 /** Footers, that can be set in NoteDb commits. */
 public class ChangeNoteFooters {
   public static final FooterKey FOOTER_ATTENTION = new FooterKey("Attention");
-  public static final FooterKey FOOTER_ASSIGNEE = new FooterKey("Assignee");
   public static final FooterKey FOOTER_BRANCH = new FooterKey("Branch");
   public static final FooterKey FOOTER_CHANGE_ID = new FooterKey("Change-id");
   public static final FooterKey FOOTER_COMMIT = new FooterKey("Commit");
diff --git a/java/com/google/gerrit/server/notedb/ChangeNotes.java b/java/com/google/gerrit/server/notedb/ChangeNotes.java
index 52f540d..c75fd29 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNotes.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNotes.java
@@ -16,7 +16,6 @@
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.collect.ImmutableSet.toImmutableSet;
 import static com.google.gerrit.entities.RefNames.changeMetaRef;
 import static java.util.Comparator.comparing;
 
@@ -29,7 +28,6 @@
 import com.google.common.collect.ImmutableSortedMap;
 import com.google.common.collect.ImmutableSortedSet;
 import com.google.common.collect.ListMultimap;
-import com.google.common.collect.Lists;
 import com.google.common.collect.Multimaps;
 import com.google.common.collect.Ordering;
 import com.google.common.collect.Sets;
@@ -53,7 +51,6 @@
 import com.google.gerrit.entities.RobotComment;
 import com.google.gerrit.entities.SubmitRecord;
 import com.google.gerrit.entities.SubmitRequirementResult;
-import com.google.gerrit.server.AssigneeStatusUpdate;
 import com.google.gerrit.server.ReviewerByEmailSet;
 import com.google.gerrit.server.ReviewerSet;
 import com.google.gerrit.server.ReviewerStatusUpdate;
@@ -498,26 +495,6 @@
     return state.submitRequirementsResult();
   }
 
-  /**
-   * Returns an ImmutableSet of Account.Ids of all users that have been assigned to this change. The
-   * order of the set is the order in which they were assigned.
-   */
-  public ImmutableSet<Account.Id> getPastAssignees() {
-    return Lists.reverse(state.assigneeUpdates()).stream()
-        .map(AssigneeStatusUpdate::currentAssignee)
-        .filter(Optional::isPresent)
-        .map(Optional::get)
-        .collect(toImmutableSet());
-  }
-
-  /**
-   * Returns an ImmutableList of AssigneeStatusUpdate of all the updates to the assignee field to
-   * this change. The order of the list is from most recent updates to least recent.
-   */
-  public ImmutableList<AssigneeStatusUpdate> getAssigneeUpdates() {
-    return state.assigneeUpdates();
-  }
-
   /** Returns an ImmutableSet of all hashtags for this change sorted in alphabetical order. */
   public ImmutableSet<String> getHashtags() {
     return ImmutableSortedSet.copyOf(state.hashtags());
diff --git a/java/com/google/gerrit/server/notedb/ChangeNotesCache.java b/java/com/google/gerrit/server/notedb/ChangeNotesCache.java
index 0f2c877..2d3902c 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNotesCache.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNotesCache.java
@@ -181,8 +181,6 @@
           + P
           + list(state.reviewerUpdates(), 4 * O + K + K + P)
           + P
-          + list(state.assigneeUpdates(), 4 * O + K + K)
-          + P
           + set(state.attentionSet(), 4 * O + K + I + str(15))
           + P
           + list(state.allAttentionSetUpdates(), 4 * O + K + I + str(15))
diff --git a/java/com/google/gerrit/server/notedb/ChangeNotesParser.java b/java/com/google/gerrit/server/notedb/ChangeNotesParser.java
index 467095c..0ee0689 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNotesParser.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNotesParser.java
@@ -15,7 +15,6 @@
 package com.google.gerrit.server.notedb;
 
 import static com.google.common.base.MoreObjects.firstNonNull;
-import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_ASSIGNEE;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_ATTENTION;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_BRANCH;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_CHANGE_ID;
@@ -75,7 +74,6 @@
 import com.google.gerrit.entities.SubmitRecord.Label.Status;
 import com.google.gerrit.entities.SubmitRequirementResult;
 import com.google.gerrit.metrics.Timer0;
-import com.google.gerrit.server.AssigneeStatusUpdate;
 import com.google.gerrit.server.ReviewerByEmailSet;
 import com.google.gerrit.server.ReviewerSet;
 import com.google.gerrit.server.ReviewerStatusUpdate;
@@ -160,7 +158,6 @@
   /** Holds all updates to attention set. */
   private final List<AttentionSetUpdate> allAttentionSetUpdates;
 
-  private final List<AssigneeStatusUpdate> assigneeUpdates;
   private final List<SubmitRecord> submitRecords;
   private final ListMultimap<ObjectId, HumanComment> humanComments;
   private final List<SubmitRequirementResult> submitRequirementResults;
@@ -228,7 +225,6 @@
     reviewerUpdates = new ArrayList<>();
     latestAttentionStatus = new HashMap<>();
     allAttentionSetUpdates = new ArrayList<>();
-    assigneeUpdates = new ArrayList<>();
     submitRecords = Lists.newArrayListWithExpectedSize(1);
     allChangeMessages = new ArrayList<>();
     humanComments = MultimapBuilder.hashKeys().arrayListValues().build();
@@ -301,7 +297,6 @@
         buildReviewerUpdates(),
         ImmutableSet.copyOf(latestAttentionStatus.values()),
         allAttentionSetUpdates,
-        assigneeUpdates,
         submitRecords,
         buildAllMessages(),
         humanComments,
@@ -496,7 +491,6 @@
 
     parseHashtags(commit);
     parseAttentionSetUpdates(commit);
-    parseAssigneeUpdates(commitTimestamp, commit);
 
     parseSubmission(commit, commitTimestamp);
 
@@ -745,22 +739,6 @@
     }
   }
 
-  private void parseAssigneeUpdates(Instant ts, ChangeNotesCommit commit)
-      throws ConfigInvalidException {
-    String assigneeValue = parseOneFooter(commit, FOOTER_ASSIGNEE);
-    if (assigneeValue != null) {
-      Optional<Account.Id> parsedAssignee;
-      if (assigneeValue.equals("")) {
-        // Empty footer found, assignee deleted
-        parsedAssignee = Optional.empty();
-      } else {
-        PersonIdent ident = RawParseUtils.parsePersonIdent(assigneeValue);
-        parsedAssignee = Optional.ofNullable(parseIdent(ident));
-      }
-      assigneeUpdates.add(AssigneeStatusUpdate.create(ts, ownerId, parsedAssignee));
-    }
-  }
-
   private void parseTag(ChangeNotesCommit commit) throws ConfigInvalidException {
     tag = null;
     List<String> tagLines = commit.getFooterLineValues(FOOTER_TAG);
diff --git a/java/com/google/gerrit/server/notedb/ChangeNotesState.java b/java/com/google/gerrit/server/notedb/ChangeNotesState.java
index b0079d7..1715b43 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNotesState.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNotesState.java
@@ -50,12 +50,10 @@
 import com.google.gerrit.entities.converter.PatchSetProtoConverter;
 import com.google.gerrit.json.OutputFormat;
 import com.google.gerrit.proto.Protos;
-import com.google.gerrit.server.AssigneeStatusUpdate;
 import com.google.gerrit.server.ReviewerByEmailSet;
 import com.google.gerrit.server.ReviewerSet;
 import com.google.gerrit.server.ReviewerStatusUpdate;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto;
-import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.AssigneeStatusUpdateProto;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.AttentionSetUpdateProto;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.ChangeColumnsProto;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.ReviewerByEmailSetEntryProto;
@@ -68,7 +66,6 @@
 import java.time.Instant;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
 import java.util.Set;
 import org.eclipse.jgit.lib.ObjectId;
 
@@ -124,7 +121,6 @@
       List<ReviewerStatusUpdate> reviewerUpdates,
       Set<AttentionSetUpdate> attentionSetUpdates,
       List<AttentionSetUpdate> allAttentionSetUpdates,
-      List<AssigneeStatusUpdate> assigneeUpdates,
       List<SubmitRecord> submitRecords,
       List<ChangeMessage> changeMessages,
       ListMultimap<ObjectId, HumanComment> publishedComments,
@@ -178,7 +174,6 @@
         .reviewerUpdates(reviewerUpdates)
         .attentionSet(attentionSetUpdates)
         .allAttentionSetUpdates(allAttentionSetUpdates)
-        .assigneeUpdates(assigneeUpdates)
         .submitRecords(submitRecords)
         .changeMessages(changeMessages)
         .publishedComments(publishedComments)
@@ -320,8 +315,6 @@
   /** Returns all attention set updates. */
   abstract ImmutableList<AttentionSetUpdate> allAttentionSetUpdates();
 
-  abstract ImmutableList<AssigneeStatusUpdate> assigneeUpdates();
-
   abstract ImmutableList<SubmitRecord> submitRecords();
 
   abstract ImmutableList<ChangeMessage> changeMessages();
@@ -369,9 +362,6 @@
     change.setTopic(Strings.emptyToNull(c.topic()));
     change.setLastUpdatedOn(c.lastUpdatedOn());
     change.setSubmissionId(c.submissionId());
-    if (!assigneeUpdates().isEmpty()) {
-      change.setAssignee(assigneeUpdates().get(0).currentAssignee().orElse(null));
-    }
     change.setPrivate(c.isPrivate());
     change.setWorkInProgress(c.workInProgress());
     change.setReviewStarted(c.reviewStarted());
@@ -404,7 +394,6 @@
           .reviewerUpdates(ImmutableList.of())
           .attentionSet(ImmutableSet.of())
           .allAttentionSetUpdates(ImmutableList.of())
-          .assigneeUpdates(ImmutableList.of())
           .submitRecords(ImmutableList.of())
           .changeMessages(ImmutableList.of())
           .publishedComments(ImmutableListMultimap.of())
@@ -442,8 +431,6 @@
 
     abstract Builder allAttentionSetUpdates(List<AttentionSetUpdate> attentionSetUpdates);
 
-    abstract Builder assigneeUpdates(List<AssigneeStatusUpdate> assigneeUpdates);
-
     abstract Builder submitRecords(List<SubmitRecord> submitRecords);
 
     abstract Builder changeMessages(List<ChangeMessage> changeMessages);
@@ -519,7 +506,6 @@
       object
           .allAttentionSetUpdates()
           .forEach(u -> b.addAllAttentionSetUpdate(toAttentionSetUpdateProto(u)));
-      object.assigneeUpdates().forEach(u -> b.addAssigneeUpdate(toAssigneeStatusUpdateProto(u)));
       object
           .submitRecords()
           .forEach(r -> b.addSubmitRecord(GSON.toJson(new StoredSubmitRecord(r))));
@@ -616,17 +602,6 @@
           .build();
     }
 
-    private static AssigneeStatusUpdateProto toAssigneeStatusUpdateProto(AssigneeStatusUpdate u) {
-      AssigneeStatusUpdateProto.Builder builder =
-          AssigneeStatusUpdateProto.newBuilder()
-              .setTimestampMillis(u.date().toEpochMilli())
-              .setUpdatedBy(u.updatedBy().get())
-              .setHasCurrentAssignee(u.currentAssignee().isPresent());
-
-      u.currentAssignee().ifPresent(assignee -> builder.setCurrentAssignee(assignee.get()));
-      return builder.build();
-    }
-
     @Override
     public ChangeNotesState deserialize(byte[] in) {
       ChangeNotesStateProto proto = Protos.parseUnchecked(ChangeNotesStateProto.parser(), in);
@@ -659,7 +634,6 @@
               .attentionSet(toAttentionSetUpdates(proto.getAttentionSetUpdateList()))
               .allAttentionSetUpdates(
                   toAllAttentionSetUpdates(proto.getAllAttentionSetUpdateList()))
-              .assigneeUpdates(toAssigneeStatusUpdateList(proto.getAssigneeUpdateList()))
               .submitRecords(
                   proto.getSubmitRecordList().stream()
                       .map(r -> GSON.fromJson(r, StoredSubmitRecord.class).toSubmitRecord())
@@ -783,20 +757,5 @@
       }
       return b.build();
     }
-
-    private static ImmutableList<AssigneeStatusUpdate> toAssigneeStatusUpdateList(
-        List<AssigneeStatusUpdateProto> protos) {
-      ImmutableList.Builder<AssigneeStatusUpdate> b = ImmutableList.builder();
-      for (AssigneeStatusUpdateProto proto : protos) {
-        b.add(
-            AssigneeStatusUpdate.create(
-                Instant.ofEpochMilli(proto.getTimestampMillis()),
-                Account.id(proto.getUpdatedBy()),
-                proto.getHasCurrentAssignee()
-                    ? Optional.of(Account.id(proto.getCurrentAssignee()))
-                    : Optional.empty()));
-      }
-      return b.build();
-    }
   }
 }
diff --git a/java/com/google/gerrit/server/notedb/ChangeUpdate.java b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
index 5d43e28..ef62f2e 100644
--- a/java/com/google/gerrit/server/notedb/ChangeUpdate.java
+++ b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
@@ -18,7 +18,6 @@
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.gerrit.entities.RefNames.changeMetaRef;
-import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_ASSIGNEE;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_ATTENTION;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_BRANCH;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_CHANGE_ID;
@@ -160,7 +159,6 @@
   private String commit;
   private Map<Account.Id, AttentionSetUpdate> plannedAttentionSetUpdates;
   private boolean ignoreFurtherAttentionSetUpdates;
-  private Optional<Account.Id> assignee;
   private Set<String> hashtags;
   private String changeMessage;
   private String tag;
@@ -510,15 +508,6 @@
     return attentionSetUpdatesBuilder.build();
   }
 
-  public void setAssignee(Account.Id assignee) {
-    checkArgument(assignee != null, "use removeAssignee");
-    this.assignee = Optional.of(assignee);
-  }
-
-  public void removeAssignee() {
-    this.assignee = Optional.empty();
-  }
-
   public Map<Account.Id, ReviewerStateInternal> getReviewers() {
     return reviewers;
   }
@@ -765,15 +754,6 @@
       addFooter(msg, FOOTER_COMMIT, commit);
     }
 
-    if (assignee != null) {
-      if (assignee.isPresent()) {
-        addFooter(msg, FOOTER_ASSIGNEE);
-        noteUtil.appendAccountIdIdentString(msg, assignee.get()).append('\n');
-      } else {
-        addFooter(msg, FOOTER_ASSIGNEE).append('\n');
-      }
-    }
-
     Joiner comma = Joiner.on(',');
     if (hashtags != null) {
       addFooter(msg, FOOTER_HASHTAGS, comma.join(hashtags));
@@ -1101,7 +1081,7 @@
             // remove users that are currently being removed from the attention set.
             .filter(
                 a ->
-                    plannedAttentionSetUpdates.getOrDefault(a, /*defaultValue= */ null) == null
+                    plannedAttentionSetUpdates.getOrDefault(a, /* defaultValue= */ null) == null
                         || plannedAttentionSetUpdates.get(a).operation().equals(Operation.REMOVE))
             // remove users that are still active on the change.
             .filter(a -> !isActiveOnChange(currentReviewers, a))
@@ -1173,7 +1153,6 @@
         && status == null
         && submissionId == null
         && submitRecords == null
-        && assignee == null
         && hashtags == null
         && topic == null
         && commit == null
diff --git a/java/com/google/gerrit/server/notedb/CommitRewriter.java b/java/com/google/gerrit/server/notedb/CommitRewriter.java
index a67dc07..4d71d84 100644
--- a/java/com/google/gerrit/server/notedb/CommitRewriter.java
+++ b/java/com/google/gerrit/server/notedb/CommitRewriter.java
@@ -15,7 +15,6 @@
 
 import static com.google.common.base.MoreObjects.firstNonNull;
 import static com.google.common.base.Preconditions.checkState;
-import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_ASSIGNEE;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_ATTENTION;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_LABEL;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_REAL_USER;
@@ -89,6 +88,7 @@
 import org.eclipse.jgit.lib.PersonIdent;
 import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.FooterKey;
 import org.eclipse.jgit.revwalk.FooterLine;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevSort;
@@ -110,6 +110,10 @@
 @UsedAt(UsedAt.Project.GOOGLE)
 @Singleton
 public class CommitRewriter {
+  // Reading and Writing assignee footer no longer supported. We keep the definition here to be able
+  // to rewrite older commit messages.
+  public static final FooterKey FOOTER_ASSIGNEE = new FooterKey("Assignee");
+
   /** Options to run {@link #backfillProject}. */
   public static class RunOptions implements Serializable {
     private static final long serialVersionUID = 1L;
@@ -365,7 +369,9 @@
       }
     }
     accounts.addAll(changeNotes.getAllPastReviewers());
-    accounts.addAll(changeNotes.getPastAssignees());
+    // Change Notes class can no longer read or write assignees, we skip assignee accounts at
+    // verifyCommit stage.
+    // accounts.addAll(changeNotes.getPastAssignees());
     changeNotes
         .getAttentionSetUpdates()
         .forEach(attentionSetUpdate -> accounts.add(attentionSetUpdate.account()));
diff --git a/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java b/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java
index 4543b50..8d7066f 100644
--- a/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java
+++ b/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java
@@ -166,7 +166,8 @@
             + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n"
             + "Patch-set: 1\n"
             + "Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7\n"
-            + "Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 2 <2@gerrit>\n"
+            + "Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 2"
+            + " <2@gerrit>\n"
             + "Label: Label1=0, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 2 <2@gerrit>\n"
             + "Subject: This is a test change\n");
 
@@ -183,14 +184,24 @@
     assertParseFails("Update change\n\nPatch-set: 1\nLabel: Label1=+1, \n");
     assertParseFails("Update change\n\nPatch-set: 1\nLabel: Label1=+1,\n");
     assertParseFails(
-        "Update change\n\nPatch-set: 1\nLabel: Label1=-1,  577fb248e474018276351785930358ec0450e9f7 Gerrit User 2 <2@gerrit>\n");
+        "Update change\n\n"
+            + "Patch-set: 1\n"
+            + "Label: Label1=-1,  577fb248e474018276351785930358ec0450e9f7 Gerrit User 2"
+            + " <2@gerrit>\n");
     assertParseFails(
-        "Update change\n\nPatch-set: 1\nLabel: Label1=-1,  577fb248e474018276351785930358ec0450e9f7\n");
+        "Update change\n\n"
+            + "Patch-set: 1\n"
+            + "Label: Label1=-1,  577fb248e474018276351785930358ec0450e9f7\n");
     // UUID for removals is not supported.
     assertParseFails(
-        "Update change\n\nPatch-set: 1\nLabel: -Label1, 577fb248e474018276351785930358ec0450e9f7\n");
+        "Update change\n\n"
+            + "Patch-set: 1\n"
+            + "Label: -Label1, 577fb248e474018276351785930358ec0450e9f7\n");
     assertParseFails(
-        "Update change\n\nPatch-set: 1\nLabel: -Label1, 577fb248e474018276351785930358ec0450e9f7 Other Account <2@gerrit>\n");
+        "Update change\n\n"
+            + "Patch-set: 1\n"
+            + "Label: -Label1, 577fb248e474018276351785930358ec0450e9f7 Other Account"
+            + " <2@gerrit>\n");
   }
 
   @Test
@@ -234,13 +245,20 @@
             + "Branch: refs/heads/master\n"
             + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n"
             + "Patch-set: 1\n"
-            + "Copied-Label: Label2=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit>\n"
-            + "Copied-Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit>\n"
-            + "Copied-Label: Label3=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag\"\n"
-            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit> :\"tag with characters %^#@^( *::!\"\n"
-            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit> :\"tag with uuid delimiter , \"\n"
-            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag with characters %^#@^( *::!\"\n"
-            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag with uuid delimiter , \"\n"
+            + "Copied-Label: Label2=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit>\n"
+            + "Copied-Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit>,Gerrit User 2 <2@gerrit>\n"
+            + "Copied-Label: Label3=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag\"\n"
+            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit> :\"tag with characters %^#@^( *::!\"\n"
+            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit> :\"tag with uuid delimiter , \"\n"
+            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag with characters %^#@^( *::!\"\n"
+            + "Copied-Label: Label4=+1, 577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag with uuid delimiter , \"\n"
             + "Subject: This is a test change\n");
 
     assertParseSucceeds(
@@ -250,23 +268,34 @@
             + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n"
             + "Patch-set: 1\n"
             + "Copied-Label: Label2=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>\n"
-            + "Copied-Label: Label1=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit>\n"
-            + "Copied-Label: Label3=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag\"\n"
-            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit> :\"tag with characters %^#@^( *::!\"\n"
-            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit> :\"tag with uuid delimiter , \"\n"
-            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag with characters %^#@^( *::!\"\n"
-            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit> :\"tag with uuid delimiter , \"\n"
+            + "Copied-Label: Label1=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2"
+            + " <2@gerrit>\n"
+            + "Copied-Label: Label3=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2"
+            + " <2@gerrit> :\"tag\"\n"
+            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit> :\"tag with"
+            + " characters %^#@^( *::!\"\n"
+            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit> :\"tag with uuid"
+            + " delimiter , \"\n"
+            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2"
+            + " <2@gerrit> :\"tag with characters %^#@^( *::!\"\n"
+            + "Copied-Label: Label4=+1, non-SHA1_UUID Gerrit User 1 <1@gerrit>,Gerrit User 2"
+            + " <2@gerrit> :\"tag with uuid delimiter , \"\n"
             + "Subject: This is a test change\n");
 
     assertParseFails("Update change\n\nPatch-set: 1\nCopied-Label: Label1=+1,\n");
     assertParseFails("Update change\n\nPatch-set: 1\nCopied-Label: Label1=+1,\n");
     assertParseFails("Update change\n\nPatch-set: 1\nCopied-Label: Label1=+1 ,\n");
     assertParseFails(
-        "Copied-Label: Label1=+1,  577fb248e474018276351785930358ec0450e9f7 Gerrit User 1 <1@gerrit>,Gerrit User 2 <2@gerrit>\n\n");
+        "Copied-Label: Label1=+1,  577fb248e474018276351785930358ec0450e9f7 Gerrit User 1"
+            + " <1@gerrit>,Gerrit User 2 <2@gerrit>\n\n");
     assertParseFails(
-        "Update change\n\nPatch-set: 1\nCopied-Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7");
+        "Update change\n\n"
+            + "Patch-set: 1\n"
+            + "Copied-Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7");
     assertParseFails(
-        "Update change\n\nPatch-set: 1\nCopied-Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7 :\"tag\"\n");
+        "Update change\n\n"
+            + "Patch-set: 1\n"
+            + "Copied-Label: Label1=+1, 577fb248e474018276351785930358ec0450e9f7 :\"tag\"\n");
 
     // UUID for removals is not supported.
     assertParseFails(
@@ -350,26 +379,6 @@
   }
 
   @Test
-  public void parseAssignee() throws Exception {
-    assertParseSucceeds(
-        "Update change\n"
-            + "\n"
-            + "Branch: refs/heads/master\n"
-            + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n"
-            + "Patch-set: 1\n"
-            + "Assignee: Change Owner <1@gerrit>\n"
-            + "Subject: This is a test change\n");
-    assertParseSucceeds(
-        "Update change\n"
-            + "\n"
-            + "Branch: refs/heads/master\n"
-            + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n"
-            + "Patch-set: 2\n"
-            + "Assignee:\n"
-            + "Subject: This is a test change\n");
-  }
-
-  @Test
   public void parseTopic() throws Exception {
     assertParseSucceeds(
         "Update change\n"
diff --git a/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java b/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
index c654828..9a29230 100644
--- a/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
+++ b/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
@@ -45,12 +45,10 @@
 import com.google.gerrit.entities.converter.PatchSetProtoConverter;
 import com.google.gerrit.proto.Entities;
 import com.google.gerrit.proto.Protos;
-import com.google.gerrit.server.AssigneeStatusUpdate;
 import com.google.gerrit.server.ReviewerByEmailSet;
 import com.google.gerrit.server.ReviewerSet;
 import com.google.gerrit.server.ReviewerStatusUpdate;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto;
-import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.AssigneeStatusUpdateProto;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.AttentionSetUpdateProto;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.ChangeColumnsProto;
 import com.google.gerrit.server.cache.proto.Cache.ChangeNotesStateProto.ReviewerByEmailSetEntryProto;
@@ -806,37 +804,6 @@
   }
 
   @Test
-  public void serializeAssigneeUpdates() throws Exception {
-    assertRoundTrip(
-        newBuilder()
-            .assigneeUpdates(
-                ImmutableList.of(
-                    AssigneeStatusUpdate.create(
-                        Instant.ofEpochMilli(1212L),
-                        Account.id(1000),
-                        Optional.of(Account.id(2001))),
-                    AssigneeStatusUpdate.create(
-                        Instant.ofEpochMilli(3434L), Account.id(1000), Optional.empty())))
-            .build(),
-        ChangeNotesStateProto.newBuilder()
-            .setMetaId(SHA_BYTES)
-            .setChangeId(ID.get())
-            .setColumns(colsProto)
-            .addAssigneeUpdate(
-                AssigneeStatusUpdateProto.newBuilder()
-                    .setTimestampMillis(1212L)
-                    .setUpdatedBy(1000)
-                    .setCurrentAssignee(2001)
-                    .setHasCurrentAssignee(true))
-            .addAssigneeUpdate(
-                AssigneeStatusUpdateProto.newBuilder()
-                    .setTimestampMillis(3434L)
-                    .setUpdatedBy(1000)
-                    .setHasCurrentAssignee(false))
-            .build());
-  }
-
-  @Test
   public void serializeSubmitRecords() throws Exception {
     SubmitRecord sr1 = new SubmitRecord();
     sr1.status = SubmitRecord.Status.OK;
@@ -971,9 +938,6 @@
                 .put(
                     "allAttentionSetUpdates",
                     new TypeLiteral<ImmutableList<AttentionSetUpdate>>() {}.getType())
-                .put(
-                    "assigneeUpdates",
-                    new TypeLiteral<ImmutableList<AssigneeStatusUpdate>>() {}.getType())
                 .put("submitRecords", new TypeLiteral<ImmutableList<SubmitRecord>>() {}.getType())
                 .put("changeMessages", new TypeLiteral<ImmutableList<ChangeMessage>>() {}.getType())
                 .put(
@@ -1088,19 +1052,6 @@
   }
 
   @Test
-  public void assigneeStatusUpdateMethods() throws Exception {
-    assertThatSerializedClass(AssigneeStatusUpdate.class)
-        .hasAutoValueMethods(
-            ImmutableMap.of(
-                "date",
-                Instant.class,
-                "updatedBy",
-                Account.Id.class,
-                "currentAssignee",
-                new TypeLiteral<Optional<Account.Id>>() {}.getType()));
-  }
-
-  @Test
   public void submitRecordFields() throws Exception {
     assertThatSerializedClass(SubmitRecord.class)
         .hasFields(
diff --git a/javatests/com/google/gerrit/server/notedb/ChangeNotesTest.java b/javatests/com/google/gerrit/server/notedb/ChangeNotesTest.java
index 9cd002e..cf739f6 100644
--- a/javatests/com/google/gerrit/server/notedb/ChangeNotesTest.java
+++ b/javatests/com/google/gerrit/server/notedb/ChangeNotesTest.java
@@ -53,7 +53,6 @@
 import com.google.gerrit.entities.SubmissionId;
 import com.google.gerrit.entities.SubmitRecord;
 import com.google.gerrit.exceptions.StorageException;
-import com.google.gerrit.server.AssigneeStatusUpdate;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.IdentifiedUser;
 import com.google.gerrit.server.ReviewerSet;
@@ -1474,91 +1473,6 @@
   }
 
   @Test
-  public void assigneeCommit() throws Exception {
-    Change c = newChange();
-    ChangeUpdate update = newUpdate(c, changeOwner);
-    update.setAssignee(otherUserId);
-    ObjectId result = update.commit();
-    assertThat(result).isNotNull();
-    try (RevWalk rw = new RevWalk(repo)) {
-      RevCommit commit = rw.parseCommit(update.getResult());
-      rw.parseBody(commit);
-      String strIdent = "Gerrit User " + otherUserId + " <" + otherUserId + "@" + serverId + ">";
-      assertThat(commit.getFullMessage()).contains("Assignee: " + strIdent);
-    }
-  }
-
-  @Test
-  public void assigneeChangeNotes() throws Exception {
-    Change c = newChange();
-    ChangeUpdate update = newUpdate(c, changeOwner);
-    update.setAssignee(otherUserId);
-    update.commit();
-
-    ChangeNotes notes = newNotes(c);
-    assertThat(notes.getChange().getAssignee()).isEqualTo(otherUserId);
-
-    update = newUpdate(c, changeOwner);
-    update.setAssignee(changeOwner.getAccountId());
-    update.commit();
-
-    notes = newNotes(c);
-    assertThat(notes.getChange().getAssignee()).isEqualTo(changeOwner.getAccountId());
-  }
-
-  @Test
-  public void pastAssigneesChangeNotes() throws Exception {
-    Change c = newChange();
-    ChangeUpdate update = newUpdate(c, changeOwner);
-    update.setAssignee(otherUserId);
-    update.commit();
-
-    update = newUpdate(c, changeOwner);
-    update.setAssignee(changeOwner.getAccountId());
-    update.commit();
-
-    update = newUpdate(c, changeOwner);
-    update.setAssignee(otherUserId);
-    update.commit();
-
-    update = newUpdate(c, changeOwner);
-    update.removeAssignee();
-    update.commit();
-
-    ChangeNotes notes = newNotes(c);
-    assertThat(notes.getPastAssignees()).hasSize(2);
-  }
-
-  @Test
-  public void assigneeStatusUpdateChangeNotes() throws Exception {
-    Change c = newChange();
-    ChangeUpdate update = newUpdate(c, otherUser);
-    update.setAssignee(otherUserId);
-    update.commit();
-
-    update = newUpdate(c, changeOwner);
-    update.removeAssignee();
-    update.commit();
-
-    update = newUpdate(c, changeOwner);
-    update.setAssignee(changeOwner.getAccountId());
-    update.commit();
-
-    update = newUpdate(c, changeOwner);
-    update.setAssignee(otherUserId);
-    update.commit();
-
-    ChangeNotes notes = newNotes(c);
-    ImmutableList<AssigneeStatusUpdate> statusUpdates = notes.getAssigneeUpdates();
-    assertThat(statusUpdates).hasSize(4);
-    assertThat(statusUpdates.get(3).updatedBy()).isEqualTo(otherUserId);
-    assertThat(statusUpdates.get(3).currentAssignee()).hasValue(otherUserId);
-    assertThat(statusUpdates.get(2).currentAssignee()).isEmpty();
-    assertThat(statusUpdates.get(1).currentAssignee()).hasValue(changeOwner.getAccountId());
-    assertThat(statusUpdates.get(0).currentAssignee()).hasValue(otherUserId);
-  }
-
-  @Test
   public void hashtagCommit() throws Exception {
     Change c = newChange();
     ChangeUpdate update = newUpdate(c, changeOwner);
diff --git a/javatests/com/google/gerrit/server/notedb/CommitRewriterTest.java b/javatests/com/google/gerrit/server/notedb/CommitRewriterTest.java
index 527e78e..4f4911a 100644
--- a/javatests/com/google/gerrit/server/notedb/CommitRewriterTest.java
+++ b/javatests/com/google/gerrit/server/notedb/CommitRewriterTest.java
@@ -214,37 +214,37 @@
   @Test
   public void maxRefsToUpdate_coversAllInvalid_inMultipleBatches() throws Exception {
     testMaxRefsToUpdate(
-        /*numberOfInvalidChanges=*/ 11,
-        /*numberOfValidChanges=*/ 9,
-        /*maxRefsToUpdate=*/ 12,
-        /*maxRefsInBatch=*/ 2);
+        /* numberOfInvalidChanges= */ 11,
+        /* numberOfValidChanges= */ 9,
+        /* maxRefsToUpdate= */ 12,
+        /* maxRefsInBatch= */ 2);
   }
 
   @Test
   public void maxRefsToUpdate_coversAllInvalid_inSingleBatch() throws Exception {
     testMaxRefsToUpdate(
-        /*numberOfInvalidChanges=*/ 11,
-        /*numberOfValidChanges=*/ 9,
-        /*maxRefsToUpdate=*/ 12,
-        /*maxRefsInBatch=*/ 12);
+        /* numberOfInvalidChanges= */ 11,
+        /* numberOfValidChanges= */ 9,
+        /* maxRefsToUpdate= */ 12,
+        /* maxRefsInBatch= */ 12);
   }
 
   @Test
   public void moreInvalidRefs_thenMaxRefsToUpdate_inMultipleBatches() throws Exception {
     testMaxRefsToUpdate(
-        /*numberOfInvalidChanges=*/ 11,
-        /*numberOfValidChanges=*/ 9,
-        /*maxRefsToUpdate=*/ 10,
-        /*maxRefsInBatch=*/ 2);
+        /* numberOfInvalidChanges= */ 11,
+        /* numberOfValidChanges= */ 9,
+        /* maxRefsToUpdate= */ 10,
+        /* maxRefsInBatch= */ 2);
   }
 
   @Test
   public void moreInvalidRefs_thenMaxRefsToUpdate_inSingleBatch() throws Exception {
     testMaxRefsToUpdate(
-        /*numberOfInvalidChanges=*/ 11,
-        /*numberOfValidChanges=*/ 9,
-        /*maxRefsToUpdate=*/ 10,
-        /*maxRefsInBatch=*/ 10);
+        /* numberOfInvalidChanges= */ 11,
+        /* numberOfValidChanges= */ 9,
+        /* maxRefsToUpdate= */ 10,
+        /* maxRefsInBatch= */ 10);
   }
 
   private void testMaxRefsToUpdate(
@@ -333,7 +333,7 @@
     RevCommit invalidUpdateCommit =
         writeUpdate(
             RefNames.changeMetaRef(c.getId()),
-            getChangeUpdateBody(c, /*changeMessage=*/ null),
+            getChangeUpdateBody(c, /* changeMessage= */ null),
             invalidAuthorIdent);
     ChangeUpdate validUpdate = newUpdate(c, changeOwner);
     validUpdate.setChangeMessage("verification from jenkins");
@@ -472,7 +472,8 @@
                     // valid change message that should not be overwritten
                     getChangeUpdateBody(
                         c,
-                        "Removed cc <GERRIT_ACCOUNT_2> with the following votes:\n\n * Code-Review+2 by <GERRIT_ACCOUNT_2>",
+                        "Removed cc <GERRIT_ACCOUNT_2> with the following votes:\n\n"
+                            + " * Code-Review+2 by <GERRIT_ACCOUNT_2>",
                         "CC: " + reviewerIdentToFix),
                     getAuthorIdent(otherUser.getAccount())))
             .add(
@@ -677,7 +678,7 @@
                     RefNames.changeMetaRef(c.getId()),
                     getChangeUpdateBody(
                         c,
-                        /*changeMessage=*/ null,
+                        /* changeMessage= */ null,
                         "Label: -Verified " + approverIdentToFix,
                         "Label: Custom-Label-1=-1 " + approverIdentToFix,
                         "Label: Verified=+1",
@@ -690,7 +691,7 @@
                     RefNames.changeMetaRef(c.getId()),
                     getChangeUpdateBody(
                         c,
-                        /*changeMessage=*/ null,
+                        /* changeMessage= */ null,
                         "Label: -Verified " + changeOwnerIdentToFix,
                         "Label: Custom-Label-1=+1"),
                     getAuthorIdent(otherUser.getAccount())))
@@ -812,7 +813,7 @@
                     RefNames.changeMetaRef(c.getId()),
                     getChangeUpdateBody(
                         c,
-                        /*changeMessage=*/ "Removed Code-Review+2 by " + otherUser.getNameEmail(),
+                        /* changeMessage= */ "Removed Code-Review+2 by " + otherUser.getNameEmail(),
                         "Label: -Code-Review " + approverIdentToFix),
                     getAuthorIdent(changeOwner.getAccount())))
             .add(
@@ -820,7 +821,8 @@
                     RefNames.changeMetaRef(c.getId()),
                     getChangeUpdateBody(
                         c,
-                        /*changeMessage=*/ "Removed Custom-Label-1 by " + otherUser.getNameEmail(),
+                        /* changeMessage= */ "Removed Custom-Label-1 by "
+                            + otherUser.getNameEmail(),
                         "Label: -Custom-Label " + getValidIdentAsString(otherUser.getAccount())),
                     getAuthorIdent(changeOwner.getAccount())))
             .add(
@@ -828,7 +830,7 @@
                     RefNames.changeMetaRef(c.getId()),
                     getChangeUpdateBody(
                         c,
-                        /*changeMessage=*/ "Removed Verified+2 by " + changeOwner.getNameEmail(),
+                        /* changeMessage= */ "Removed Verified+2 by " + changeOwner.getNameEmail(),
                         "Label: -Verified"),
                     getAuthorIdent(changeOwner.getAccount())))
             .build();
@@ -928,7 +930,7 @@
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
             c,
-            /*changeMessage=*/ "Removed Verified+2 by " + otherUser.getNameEmail(),
+            /* changeMessage= */ "Removed Verified+2 by " + otherUser.getNameEmail(),
             "Label: -Verified"),
         invalidAuthorIdent);
 
@@ -961,19 +963,19 @@
         RefNames.changeMetaRef(c.getId()),
 
         // Even though footer is missing, accounts are matched among the account in change updates.
-        getChangeUpdateBody(c, /*changeMessage=*/ "Removed Verified-1 by Other Account (0002)"),
+        getChangeUpdateBody(c, /* changeMessage= */ "Removed Verified-1 by Other Account (0002)"),
         getAuthorIdent(changeOwner.getAccount()));
 
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
-            c, /*changeMessage=*/ "Removed Verified+2 by " + changeOwner.getNameEmail()),
+            c, /* changeMessage= */ "Removed Verified+2 by " + changeOwner.getNameEmail()),
         getAuthorIdent(changeOwner.getAccount()));
 
     // No rewrite for default
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
-        getChangeUpdateBody(c, /*changeMessage=*/ "Removed Verified+2 by Gerrit Account"),
+        getChangeUpdateBody(c, /* changeMessage= */ "Removed Verified+2 by Gerrit Account"),
         getAuthorIdent(changeOwner.getAccount()));
 
     RunOptions options = new RunOptions();
@@ -1006,7 +1008,8 @@
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
-            c, /*changeMessage=*/ "Removed Verified+2 by Renamed Change Owner <change@owner.com>"),
+            c,
+            /* changeMessage= */ "Removed Verified+2 by Renamed Change Owner <change@owner.com>"),
         getAuthorIdent(changeOwner.getAccount()));
 
     RunOptions options = new RunOptions();
@@ -1035,7 +1038,7 @@
     approvalUpdate.commit();
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
-        getChangeUpdateBody(c, /*changeMessage=*/ "Removed Verified+2 by Change Owner"),
+        getChangeUpdateBody(c, /* changeMessage= */ "Removed Verified+2 by Change Owner"),
         getAuthorIdent(changeOwner.getAccount()));
 
     RunOptions options = new RunOptions();
@@ -1072,17 +1075,17 @@
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
-            c, /*changeMessage=*/ "Removed Verified+2 by Change Owner <other@test.com>"),
+            c, /* changeMessage= */ "Removed Verified+2 by Change Owner <other@test.com>"),
         getAuthorIdent(changeOwner.getAccount()));
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
-            c, /*changeMessage=*/ "Removed Verified+2 by Change Owner <change@owner.com>"),
+            c, /* changeMessage= */ "Removed Verified+2 by Change Owner <change@owner.com>"),
         getAuthorIdent(changeOwner.getAccount()));
     writeUpdate(
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
-            c, /*changeMessage=*/ "Removed Verified-1 by Change Owner <other@test.com>"),
+            c, /* changeMessage= */ "Removed Verified-1 by Change Owner <other@test.com>"),
         getAuthorIdent(changeOwner.getAccount()));
 
     RunOptions options = new RunOptions();
@@ -1121,7 +1124,7 @@
         // Even though footer is missing, accounts are matched among the account in change updates.
         getChangeUpdateBody(
             c,
-            /*changeMessage=*/ "Removed the following votes:\n"
+            /* changeMessage= */ "Removed the following votes:\n"
                 + String.format("* Verified-1 by %s\n", otherUser.getNameEmail())),
         getAuthorIdent(changeOwner.getAccount()));
 
@@ -1129,7 +1132,7 @@
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
             c,
-            /*changeMessage=*/ "Removed the following votes:\n"
+            /* changeMessage= */ "Removed the following votes:\n"
                 + String.format("* Verified+2 by %s\n", changeOwner.getNameEmail())
                 + String.format("* Verified-1 by %s\n", changeOwner.getNameEmail())
                 + String.format("* Code-Review by %s\n", otherUser.getNameEmail())),
@@ -1140,7 +1143,7 @@
         RefNames.changeMetaRef(c.getId()),
         getChangeUpdateBody(
             c,
-            /*changeMessage=*/ "Removed the following votes:\n"
+            /* changeMessage= */ "Removed the following votes:\n"
                 + "* Verified+2 by Gerrit Account\n"
                 + "* Verified-1 by <GERRIT_ACCOUNT_2>\n"),
         getAuthorIdent(changeOwner.getAccount()));
@@ -1200,7 +1203,7 @@
             RefNames.changeMetaRef(c.getId()),
             getChangeUpdateBody(
                 c,
-                /*changeMessage=*/ null,
+                /* changeMessage= */ null,
                 // Only 'person_ident' fix is required
                 "Attention: "
                     + gson.toJson(
@@ -1354,27 +1357,51 @@
     assertThat(commitHistoryDiff.get(0))
         .isEqualTo(
             "@@ -8 +8 @@\n"
-                + "-Attention: {\"person_ident\":\"Gerrit User 2 \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by Other Account using the hovercard menu\"}\n"
-                + "+Attention: {\"person_ident\":\"Gerrit User 2 \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by someone using the hovercard menu\"}\n");
+                + "-Attention: {\"person_ident\":\"Gerrit User 2"
+                + " \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by Other"
+                + " Account using the hovercard menu\"}\n"
+                + "+Attention: {\"person_ident\":\"Gerrit User 2"
+                + " \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by someone"
+                + " using the hovercard menu\"}\n");
     assertThat(Arrays.asList(commitHistoryDiff.get(1).split("\n")))
         .containsExactly(
             "@@ -7,2 +7,2 @@",
-            "-Attention: {\"person_ident\":\"Gerrit User 1 \\u003c1@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Other Account replied on the change\"}",
-            "-Attention: {\"person_ident\":\"Gerrit User 2 \\u003c2@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by Other Account using the hovercard menu\"}",
-            "+Attention: {\"person_ident\":\"Gerrit User 1 \\u003c1@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Someone replied on the change\"}",
-            "+Attention: {\"person_ident\":\"Gerrit User 2 \\u003c2@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by someone using the hovercard menu\"}");
+            "-Attention: {\"person_ident\":\"Gerrit User 1"
+                + " \\u003c1@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Other Account"
+                + " replied on the change\"}",
+            "-Attention: {\"person_ident\":\"Gerrit User 2"
+                + " \\u003c2@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by Other"
+                + " Account using the hovercard menu\"}",
+            "+Attention: {\"person_ident\":\"Gerrit User 1"
+                + " \\u003c1@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Someone replied on"
+                + " the change\"}",
+            "+Attention: {\"person_ident\":\"Gerrit User 2"
+                + " \\u003c2@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by"
+                + " someone using the hovercard menu\"}");
     assertThat(Arrays.asList(commitHistoryDiff.get(2).split("\n")))
         .containsExactly(
             "@@ -7,2 +7,2 @@",
-            "-Attention: {\"person_ident\":\"Other Account \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by someone using the hovercard menu\"}",
-            "-Attention: {\"person_ident\":\"Change Owner \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Other Account replied on the change\"}",
-            "+Attention: {\"person_ident\":\"Gerrit User 2 \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by someone using the hovercard menu\"}",
-            "+Attention: {\"person_ident\":\"Gerrit User 1 \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Someone replied on the change\"}");
+            "-Attention: {\"person_ident\":\"Other Account"
+                + " \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by someone"
+                + " using the hovercard menu\"}",
+            "-Attention: {\"person_ident\":\"Change Owner"
+                + " \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Other Account"
+                + " replied on the change\"}",
+            "+Attention: {\"person_ident\":\"Gerrit User 2"
+                + " \\u003c2@gerrit\\u003e\",\"operation\":\"ADD\",\"reason\":\"Added by someone"
+                + " using the hovercard menu\"}",
+            "+Attention: {\"person_ident\":\"Gerrit User 1"
+                + " \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Someone replied"
+                + " on the change\"}");
     assertThat(commitHistoryDiff.get(3))
         .isEqualTo(
             "@@ -7 +7 @@\n"
-                + "-Attention: {\"person_ident\":\"Gerrit User 1 \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by Other Account by clicking the attention icon\"}\n"
-                + "+Attention: {\"person_ident\":\"Gerrit User 1 \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by someone by clicking the attention icon\"}\n");
+                + "-Attention: {\"person_ident\":\"Gerrit User 1"
+                + " \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by Other"
+                + " Account by clicking the attention icon\"}\n"
+                + "+Attention: {\"person_ident\":\"Gerrit User 1"
+                + " \\u003c1@gerrit\\u003e\",\"operation\":\"REMOVE\",\"reason\":\"Removed by"
+                + " someone by clicking the attention icon\"}\n");
     BackfillResult secondRunResult = rewriter.backfillProject(project, repo, options);
     assertThat(secondRunResult.fixedRefDiff.keySet()).isEmpty();
     assertThat(secondRunResult.refsFailedToFix).isEmpty();
@@ -1483,13 +1510,15 @@
     commitsToFix.add(invalidCherryPickedMessageUpdate.commit());
     ChangeUpdate invalidRebasedMessageUpdate = newUpdate(c, changeOwner);
     invalidRebasedMessageUpdate.setChangeMessage(
-        "Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b by "
+        "Change has been successfully rebased and submitted as"
+            + " e40dc1a50dc7f457a37579e2755374f3e1a5413b by "
             + changeOwner.getName());
 
     commitsToFix.add(invalidRebasedMessageUpdate.commit());
     ChangeUpdate validSubmitMessageUpdate = newUpdate(c, changeOwner);
     validSubmitMessageUpdate.setChangeMessage(
-        "Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b");
+        "Change has been successfully rebased and submitted as"
+            + " e40dc1a50dc7f457a37579e2755374f3e1a5413b");
     validSubmitMessageUpdate.commit();
 
     Ref metaRefBeforeRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
@@ -1512,15 +1541,21 @@
     assertThat(changeMessages(notesBeforeRewrite))
         .containsExactly(
             "Change has been successfully merged by Change Owner",
-            "Change has been successfully cherry-picked as e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner",
-            "Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner",
-            "Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b");
+            "Change has been successfully cherry-picked as e40dc1a50dc7f457a37579e2755374f3e1a5413b"
+                + " by Change Owner",
+            "Change has been successfully rebased and submitted as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner",
+            "Change has been successfully rebased and submitted as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b");
     assertThat(changeMessages(notesAfterRewrite))
         .containsExactly(
             "Change has been successfully merged",
-            "Change has been successfully cherry-picked as e40dc1a50dc7f457a37579e2755374f3e1a5413b",
-            "Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b",
-            "Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b");
+            "Change has been successfully cherry-picked as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b",
+            "Change has been successfully rebased and submitted as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b",
+            "Change has been successfully rebased and submitted as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b");
 
     Ref metaRefAfterRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
     assertThat(metaRefAfterRewrite.getObjectId()).isNotEqualTo(metaRefBeforeRewrite.getObjectId());
@@ -1536,11 +1571,15 @@
                 + "-Change has been successfully merged by Change Owner\n"
                 + "+Change has been successfully merged\n",
             "@@ -6 +6 @@\n"
-                + "-Change has been successfully cherry-picked as e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner\n"
-                + "+Change has been successfully cherry-picked as e40dc1a50dc7f457a37579e2755374f3e1a5413b\n",
+                + "-Change has been successfully cherry-picked as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner\n"
+                + "+Change has been successfully cherry-picked as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b\n",
             "@@ -6 +6 @@\n"
-                + "-Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner\n"
-                + "+Change has been successfully rebased and submitted as e40dc1a50dc7f457a37579e2755374f3e1a5413b\n");
+                + "-Change has been successfully rebased and submitted as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b by Change Owner\n"
+                + "+Change has been successfully rebased and submitted as"
+                + " e40dc1a50dc7f457a37579e2755374f3e1a5413b\n");
     BackfillResult secondRunResult = rewriter.backfillProject(project, repo, options);
     assertThat(secondRunResult.fixedRefDiff.keySet()).isEmpty();
     assertThat(secondRunResult.refsFailedToFix).isEmpty();
@@ -1610,7 +1649,7 @@
             RefNames.changeMetaRef(c.getId()),
             getChangeUpdateBody(
                 c,
-                /*changeMessage=*/ null,
+                /* changeMessage= */ null,
                 "Label: SUBM=+1",
                 "Submission-id: 5271-1496917120975-10a10df9",
                 "Submitted-with: NOT_READY",
@@ -1876,59 +1915,72 @@
     ChangeUpdate invalidOnReviewUpdate = newUpdate(c, changeOwner);
     invalidOnReviewUpdate.setChangeMessage(
         "Patch Set 1: Any-Label+2 Other-Label+2 Code-Review+2\n\n"
-            + "By voting Code-Review+2 the following files are now code-owner approved by Change Owner:\n"
+            + "By voting Code-Review+2 the following files are now code-owner approved by Change"
+            + " Owner:\n"
             + "   * file1.java\n"
             + "   * file2.ts\n"
-            + "By voting Any-Label+2 the code-owners submit requirement is overridden by Change Owner\n"
-            + "By voting Other-Label+2 the code-owners submit requirement is still overridden by Change Owner\n");
+            + "By voting Any-Label+2 the code-owners submit requirement is overridden by Change"
+            + " Owner\n"
+            + "By voting Other-Label+2 the code-owners submit requirement is still overridden by"
+            + " Change Owner\n");
     commitsToFix.add(invalidOnReviewUpdate.commit());
 
     ChangeUpdate invalidOnReviewUpdateAnyOrder = newUpdate(c, changeOwner);
     invalidOnReviewUpdateAnyOrder.setChangeMessage(
         "Patch Set 1: Any-Label+2 Other-Label+2 Code-Review+2\n\n"
-            + "By voting Any-Label+2 the code-owners submit requirement is overridden by Change Owner\n"
-            + "By voting Other-Label+2 the code-owners submit requirement is still overridden by Change Owner\n"
-            + "By voting Code-Review+2 the following files are now code-owner approved by Change Owner:\n"
+            + "By voting Any-Label+2 the code-owners submit requirement is overridden by Change"
+            + " Owner\n"
+            + "By voting Other-Label+2 the code-owners submit requirement is still overridden by"
+            + " Change Owner\n"
+            + "By voting Code-Review+2 the following files are now code-owner approved by Change"
+            + " Owner:\n"
             + "   * file1.java\n"
             + "   * file2.ts\n");
     commitsToFix.add(invalidOnReviewUpdateAnyOrder.commit());
     ChangeUpdate invalidOnApprovalUpdate = newUpdate(c, otherUser);
     invalidOnApprovalUpdate.setChangeMessage(
         "Patch Set 1: -Code-Review\n\n"
-            + "By removing the Code-Review+2 vote the following files are no longer explicitly code-owner approved by Other Account:\n"
+            + "By removing the Code-Review+2 vote the following files are no longer explicitly"
+            + " code-owner approved by Other Account:\n"
             + "   * file1.java\n"
             + "   * file2.ts\n"
-            + "\nThe listed files are still implicitly approved by Other Account.\n");
+            + "\n"
+            + "The listed files are still implicitly approved by Other Account.\n");
     commitsToFix.add(invalidOnApprovalUpdate.commit());
 
     ChangeUpdate invalidOnOverrideUpdate = newUpdate(c, changeOwner);
     invalidOnOverrideUpdate.setChangeMessage(
         "Patch Set 1: -Owners-Override\n\n"
             + "(1 comment)\n\n"
-            + "By removing the Owners-Override+1 vote the code-owners submit requirement is no longer overridden by Change Owner\n");
+            + "By removing the Owners-Override+1 vote the code-owners submit requirement is no"
+            + " longer overridden by Change Owner\n");
 
     commitsToFix.add(invalidOnOverrideUpdate.commit());
 
     ChangeUpdate partiallyValidOnReviewUpdate = newUpdate(c, changeOwner);
     partiallyValidOnReviewUpdate.setChangeMessage(
         "Patch Set 1: Any-Label+2 Code-Review+2\n\n"
-            + "By voting Code-Review+2 the following files are now code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+            + "By voting Code-Review+2 the following files are now code-owner approved by"
+            + " <GERRIT_ACCOUNT_1>:\n"
             + "   * file1.java\n"
             + "   * file2.ts\n"
-            + "By voting Any-Label+2 the code-owners submit requirement is overridden by Change Owner\n");
+            + "By voting Any-Label+2 the code-owners submit requirement is overridden by Change"
+            + " Owner\n");
     commitsToFix.add(partiallyValidOnReviewUpdate.commit());
 
     ChangeUpdate validOnApprovalUpdate = newUpdate(c, changeOwner);
     validOnApprovalUpdate.setChangeMessage(
         "Patch Set 1: Code-Review-2\n\n"
-            + "By voting Code-Review-2 the following files are no longer explicitly code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+            + "By voting Code-Review-2 the following files are no longer explicitly code-owner"
+            + " approved by <GERRIT_ACCOUNT_1>:\n"
             + "   * file4.java\n");
     validOnApprovalUpdate.commit();
 
     ChangeUpdate validOnOverrideUpdate = newUpdate(c, changeOwner);
     validOnOverrideUpdate.setChangeMessage(
         "Patch Set 1: Owners-Override+1\n\n"
-            + "By voting Owners-Override+1 the code-owners submit requirement is still overridden by <GERRIT_ACCOUNT_1>\n");
+            + "By voting Owners-Override+1 the code-owners submit requirement is still overridden"
+            + " by <GERRIT_ACCOUNT_1>\n");
     validOnOverrideUpdate.commit();
 
     Ref metaRefBeforeRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
@@ -1952,39 +2004,52 @@
     assertThat(changeMessages(notesAfterRewrite))
         .containsExactly(
             "Patch Set 1: Any-Label+2 Other-Label+2 Code-Review+2\n\n"
-                + "By voting Code-Review+2 the following files are now code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+                + "By voting Code-Review+2 the following files are now code-owner approved by"
+                + " <GERRIT_ACCOUNT_1>:\n"
                 + "   * file1.java\n"
                 + "   * file2.ts\n"
-                + "By voting Any-Label+2 the code-owners submit requirement is overridden by <GERRIT_ACCOUNT_1>\n"
-                + "By voting Other-Label+2 the code-owners submit requirement is still overridden by <GERRIT_ACCOUNT_1>\n",
+                + "By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " <GERRIT_ACCOUNT_1>\n"
+                + "By voting Other-Label+2 the code-owners submit requirement is still overridden"
+                + " by <GERRIT_ACCOUNT_1>\n",
             "Patch Set 1: Any-Label+2 Other-Label+2 Code-Review+2\n\n"
-                + "By voting Any-Label+2 the code-owners submit requirement is overridden by <GERRIT_ACCOUNT_1>\n"
-                + "By voting Other-Label+2 the code-owners submit requirement is still overridden by <GERRIT_ACCOUNT_1>\n"
-                + "By voting Code-Review+2 the following files are now code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+                + "By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " <GERRIT_ACCOUNT_1>\n"
+                + "By voting Other-Label+2 the code-owners submit requirement is still overridden"
+                + " by <GERRIT_ACCOUNT_1>\n"
+                + "By voting Code-Review+2 the following files are now code-owner approved by"
+                + " <GERRIT_ACCOUNT_1>:\n"
                 + "   * file1.java\n"
                 + "   * file2.ts\n",
             "Patch Set 1: -Code-Review\n"
                 + "\n"
-                + "By removing the Code-Review+2 vote the following files are no longer explicitly code-owner approved by <GERRIT_ACCOUNT_2>:\n"
+                + "By removing the Code-Review+2 vote the following files are no longer explicitly"
+                + " code-owner approved by <GERRIT_ACCOUNT_2>:\n"
                 + "   * file1.java\n"
                 + "   * file2.ts\n"
-                + "\nThe listed files are still implicitly approved by <GERRIT_ACCOUNT_2>.\n",
+                + "\n"
+                + "The listed files are still implicitly approved by <GERRIT_ACCOUNT_2>.\n",
             "Patch Set 1: -Owners-Override\n"
                 + "\n"
                 + "(1 comment)\n"
                 + "\n"
-                + "By removing the Owners-Override+1 vote the code-owners submit requirement is no longer overridden by <GERRIT_ACCOUNT_1>\n",
+                + "By removing the Owners-Override+1 vote the code-owners submit requirement is no"
+                + " longer overridden by <GERRIT_ACCOUNT_1>\n",
             "Patch Set 1: Any-Label+2 Code-Review+2\n\n"
-                + "By voting Code-Review+2 the following files are now code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+                + "By voting Code-Review+2 the following files are now code-owner approved by"
+                + " <GERRIT_ACCOUNT_1>:\n"
                 + "   * file1.java\n"
                 + "   * file2.ts\n"
-                + "By voting Any-Label+2 the code-owners submit requirement is overridden by <GERRIT_ACCOUNT_1>\n",
+                + "By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " <GERRIT_ACCOUNT_1>\n",
             "Patch Set 1: Code-Review-2\n\n"
-                + "By voting Code-Review-2 the following files are no longer explicitly code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+                + "By voting Code-Review-2 the following files are no longer explicitly code-owner"
+                + " approved by <GERRIT_ACCOUNT_1>:\n"
                 + "   * file4.java\n",
             "Patch Set 1: Owners-Override+1\n"
                 + "\n"
-                + "By voting Owners-Override+1 the code-owners submit requirement is still overridden by <GERRIT_ACCOUNT_1>\n");
+                + "By voting Owners-Override+1 the code-owners submit requirement is still"
+                + " overridden by <GERRIT_ACCOUNT_1>\n");
 
     Ref metaRefAfterRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
     assertThat(metaRefAfterRewrite.getObjectId()).isNotEqualTo(metaRefBeforeRewrite.getObjectId());
@@ -1997,32 +2062,50 @@
     assertThat(commitHistoryDiff)
         .containsExactly(
             "@@ -8 +8 @@\n"
-                + "-By voting Code-Review+2 the following files are now code-owner approved by Change Owner:\n"
-                + "+By voting Code-Review+2 the following files are now code-owner approved by <GERRIT_ACCOUNT_1>:\n"
+                + "-By voting Code-Review+2 the following files are now code-owner approved by"
+                + " Change Owner:\n"
+                + "+By voting Code-Review+2 the following files are now code-owner approved by"
+                + " <GERRIT_ACCOUNT_1>:\n"
                 + "@@ -11,2 +11,2 @@\n"
-                + "-By voting Any-Label+2 the code-owners submit requirement is overridden by Change Owner\n"
-                + "-By voting Other-Label+2 the code-owners submit requirement is still overridden by Change Owner\n"
-                + "+By voting Any-Label+2 the code-owners submit requirement is overridden by <GERRIT_ACCOUNT_1>\n"
-                + "+By voting Other-Label+2 the code-owners submit requirement is still overridden by <GERRIT_ACCOUNT_1>\n",
+                + "-By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " Change Owner\n"
+                + "-By voting Other-Label+2 the code-owners submit requirement is still overridden"
+                + " by Change Owner\n"
+                + "+By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " <GERRIT_ACCOUNT_1>\n"
+                + "+By voting Other-Label+2 the code-owners submit requirement is still overridden"
+                + " by <GERRIT_ACCOUNT_1>\n",
             "@@ -8,3 +8,3 @@\n"
-                + "-By voting Any-Label+2 the code-owners submit requirement is overridden by Change Owner\n"
-                + "-By voting Other-Label+2 the code-owners submit requirement is still overridden by Change Owner\n"
-                + "-By voting Code-Review+2 the following files are now code-owner approved by Change Owner:\n"
-                + "+By voting Any-Label+2 the code-owners submit requirement is overridden by <GERRIT_ACCOUNT_1>\n"
-                + "+By voting Other-Label+2 the code-owners submit requirement is still overridden by <GERRIT_ACCOUNT_1>\n"
-                + "+By voting Code-Review+2 the following files are now code-owner approved by <GERRIT_ACCOUNT_1>:\n",
+                + "-By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " Change Owner\n"
+                + "-By voting Other-Label+2 the code-owners submit requirement is still overridden"
+                + " by Change Owner\n"
+                + "-By voting Code-Review+2 the following files are now code-owner approved by"
+                + " Change Owner:\n"
+                + "+By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " <GERRIT_ACCOUNT_1>\n"
+                + "+By voting Other-Label+2 the code-owners submit requirement is still overridden"
+                + " by <GERRIT_ACCOUNT_1>\n"
+                + "+By voting Code-Review+2 the following files are now code-owner approved by"
+                + " <GERRIT_ACCOUNT_1>:\n",
             "@@ -8 +8 @@\n"
-                + "-By removing the Code-Review+2 vote the following files are no longer explicitly code-owner approved by Other Account:\n"
-                + "+By removing the Code-Review+2 vote the following files are no longer explicitly code-owner approved by <GERRIT_ACCOUNT_2>:\n"
+                + "-By removing the Code-Review+2 vote the following files are no longer explicitly"
+                + " code-owner approved by Other Account:\n"
+                + "+By removing the Code-Review+2 vote the following files are no longer explicitly"
+                + " code-owner approved by <GERRIT_ACCOUNT_2>:\n"
                 + "@@ -12 +12 @@\n"
                 + "-The listed files are still implicitly approved by Other Account.\n"
                 + "+The listed files are still implicitly approved by <GERRIT_ACCOUNT_2>.\n",
             "@@ -10 +10 @@\n"
-                + "-By removing the Owners-Override+1 vote the code-owners submit requirement is no longer overridden by Change Owner\n"
-                + "+By removing the Owners-Override+1 vote the code-owners submit requirement is no longer overridden by <GERRIT_ACCOUNT_1>\n",
+                + "-By removing the Owners-Override+1 vote the code-owners submit requirement is no"
+                + " longer overridden by Change Owner\n"
+                + "+By removing the Owners-Override+1 vote the code-owners submit requirement is no"
+                + " longer overridden by <GERRIT_ACCOUNT_1>\n",
             "@@ -11 +11 @@\n"
-                + "-By voting Any-Label+2 the code-owners submit requirement is overridden by Change Owner\n"
-                + "+By voting Any-Label+2 the code-owners submit requirement is overridden by <GERRIT_ACCOUNT_1>\n");
+                + "-By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " Change Owner\n"
+                + "+By voting Any-Label+2 the code-owners submit requirement is overridden by"
+                + " <GERRIT_ACCOUNT_1>\n");
     BackfillResult secondRunResult = rewriter.backfillProject(project, repo, options);
     assertThat(secondRunResult.fixedRefDiff.keySet()).isEmpty();
     assertThat(secondRunResult.refsFailedToFix).isEmpty();
@@ -2039,34 +2122,30 @@
             getChangeUpdateBody(c, "Assignee added", "Assignee: " + assigneeIdentToFix),
             getAuthorIdent(changeOwner.getAccount()));
 
-    ChangeUpdate changeAssigneeUpdate = newUpdate(c, changeOwner);
-    changeAssigneeUpdate.setAssignee(otherUserId);
-    changeAssigneeUpdate.commit();
-
-    ChangeUpdate removeAssigneeUpdate = newUpdate(c, changeOwner);
-    removeAssigneeUpdate.removeAssignee();
-    removeAssigneeUpdate.commit();
+    // Valid commits
+    writeUpdate(
+        RefNames.changeMetaRef(c.getId()),
+        getChangeUpdateBody(
+            c,
+            "Assignee added: <GERRIT_ACCOUNT_2>",
+            "Assignee: " + getValidIdentAsString(otherUser.getAccount())),
+        getAuthorIdent(changeOwner.getAccount()));
+    writeUpdate(
+        RefNames.changeMetaRef(c.getId()),
+        getChangeUpdateBody(c, "Assignee deleted: <GERRIT_ACCOUNT_2>", "Assignee:"),
+        getAuthorIdent(changeOwner.getAccount()));
 
     Ref metaRefBeforeRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
 
     ImmutableList<RevCommit> commitsBeforeRewrite = logMetaRef(repo, metaRefBeforeRewrite);
 
     int invalidCommitIndex = commitsBeforeRewrite.indexOf(invalidUpdateCommit);
-    ChangeNotes notesBeforeRewrite = newNotes(c);
 
     RunOptions options = new RunOptions();
     options.dryRun = false;
     BackfillResult result = rewriter.backfillProject(project, repo, options);
     assertThat(result.fixedRefDiff.keySet()).containsExactly(RefNames.changeMetaRef(c.getId()));
 
-    ChangeNotes notesAfterRewrite = newNotes(c);
-    assertThat(notesBeforeRewrite.getPastAssignees())
-        .containsExactly(changeOwner.getAccountId(), otherUser.getAccountId());
-    assertThat(notesBeforeRewrite.getChange().getAssignee()).isNull();
-    assertThat(notesAfterRewrite.getPastAssignees())
-        .containsExactly(changeOwner.getAccountId(), otherUser.getAccountId());
-    assertThat(notesAfterRewrite.getChange().getAssignee()).isNull();
-
     Ref metaRefAfterRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
     assertThat(metaRefAfterRewrite.getObjectId()).isNotEqualTo(metaRefBeforeRewrite.getObjectId());
 
@@ -2145,18 +2224,13 @@
     assertThat(result.fixedRefDiff.keySet()).containsExactly(RefNames.changeMetaRef(c.getId()));
 
     ChangeNotes notesAfterRewrite = newNotes(c);
-    assertThat(notesBeforeRewrite.getPastAssignees())
-        .containsExactly(changeOwner.getAccountId(), otherUser.getAccountId());
-    assertThat(notesBeforeRewrite.getChange().getAssignee()).isNull();
     assertThat(changeMessages(notesBeforeRewrite))
         .containsExactly(
             "Assignee added: Change Owner <change@owner.com>",
-            "Assignee changed from: Change Owner <change@owner.com> to: Other Account <other@account.com>",
+            "Assignee changed from: Change Owner <change@owner.com> to: Other Account"
+                + " <other@account.com>",
             "Assignee deleted: Other Account <other@account.com>");
 
-    assertThat(notesAfterRewrite.getPastAssignees())
-        .containsExactly(changeOwner.getAccountId(), otherUser.getAccountId());
-    assertThat(notesAfterRewrite.getChange().getAssignee()).isNull();
     assertThat(changeMessages(notesAfterRewrite))
         .containsExactly(
             "Assignee added: " + AccountTemplateUtil.getAccountTemplate(changeOwner.getAccountId()),
@@ -2181,7 +2255,8 @@
                 + "-Assignee added: Change Owner <change@owner.com>\n"
                 + "+Assignee added: <GERRIT_ACCOUNT_1>\n",
             "@@ -6 +6 @@\n"
-                + "-Assignee changed from: Change Owner <change@owner.com> to: Other Account <other@account.com>\n"
+                + "-Assignee changed from: Change Owner <change@owner.com> to: Other Account"
+                + " <other@account.com>\n"
                 + "+Assignee changed from: <GERRIT_ACCOUNT_1> to: <GERRIT_ACCOUNT_2>\n",
             "@@ -6 +6 @@\n"
                 + "-Assignee deleted: Other Account <other@account.com>\n"
@@ -2244,7 +2319,8 @@
                 + "-Assignee added: Change Owner\n"
                 + "+Assignee added: <GERRIT_ACCOUNT_1>\n",
             "@@ -6 +6 @@\n"
-                + "-Assignee changed from: Change Owner <change@owner.com> to: Other Account <other@account.com>\n"
+                + "-Assignee changed from: Change Owner <change@owner.com> to: Other Account"
+                + " <other@account.com>\n"
                 + "+Assignee changed from: <GERRIT_ACCOUNT_1> to: <GERRIT_ACCOUNT_2>\n",
             "@@ -6 +6 @@\n"
                 + "-Assignee deleted: Other Account\n"
@@ -2280,17 +2356,12 @@
     ImmutableList<RevCommit> commitsBeforeRewrite = logMetaRef(repo, metaRefBeforeRewrite);
 
     int invalidCommitIndex = commitsBeforeRewrite.indexOf(invalidUpdateCommit);
-    ChangeNotes notesBeforeRewrite = newNotes(c);
 
     RunOptions options = new RunOptions();
     options.dryRun = false;
     BackfillResult result = rewriter.backfillProject(project, repo, options);
     assertThat(result.fixedRefDiff.keySet()).containsExactly(RefNames.changeMetaRef(c.getId()));
 
-    ChangeNotes notesAfterRewrite = newNotes(c);
-    assertThat(notesBeforeRewrite.getChange().getAssignee()).isEqualTo(otherUserId);
-    assertThat(notesAfterRewrite.getChange().getAssignee()).isEqualTo(otherUserId);
-
     Ref metaRefAfterRewrite = repo.exactRef(RefNames.changeMetaRef(c.getId()));
     assertThat(metaRefAfterRewrite.getObjectId()).isNotEqualTo(metaRefBeforeRewrite.getObjectId());
 
diff --git a/proto/cache.proto b/proto/cache.proto
index 0cecdea..7063ee5 100644
--- a/proto/cache.proto
+++ b/proto/cache.proto
@@ -198,14 +198,7 @@
   string server_id = 20;
   bool has_server_id = 21;
 
-  message AssigneeStatusUpdateProto {
-    // Epoch millis.
-    int64 timestamp_millis = 1;
-    int32 updated_by = 2;
-    int32 current_assignee = 3;
-    bool has_current_assignee = 4;
-  }
-  repeated AssigneeStatusUpdateProto assignee_update = 22;
+  reserved 22;  // assignee_update;
 
   // An update to the attention set of the change. See class AttentionSetUpdate
   // for context.