Shard refs/draft-comments/* by change instead of account ID

The motivation is the same as in Ib81d462: scanning the whole
refs/draft-comments/* space (with grows without bound) when reindexing
a change is potentially too slow.

Instead of refs/draft-comments/<sharded account>/<change>, use
refs/draft-comments/<sharded change>/<account>. This is mostly
straightforward, since there are relatively few places that scan
multiple refs; most callers just use the helper method in RefNames.

Change-Id: I063e2c496751f637d968c89c1501743074fb9025
This commit is contained in:
Dave Borowitz
2016-05-02 17:44:07 -04:00
committed by Edwin Kempin
parent dba0801601
commit 66c76c9d4a
13 changed files with 114 additions and 66 deletions

View File

@@ -110,7 +110,7 @@ public class DraftCommentNotes extends AbstractChangeNotes<DraftCommentNotes> {
@Override
protected String getRefName() {
return RefNames.refsDraftComments(author, getChangeId());
return RefNames.refsDraftComments(getChangeId(), author);
}
@Override