Files
gerrit/gerrit-reviewdb
Edwin Kempin dfe73dc408 Shard refs/starred-changes refs by change ID instead of account ID
If the ref is sharded by change ID, the lookup by change ID is
cheaper. This is because now we can list all refs that start with
refs/starred-changes/ plus sharded change ID and looking up refs with
a prefix that end on '/' is optimized in jgit.

Finding all changes that were starred by a user gets more expensive
since now we need to scan the complete refs/starred-changes/ namespace
for this.

The ref format is changed, because we plan to store the users that
have starred a change in the change index, and this means that we need
to look them up each time a change is reindex. If reindexing a change
would require a complete scan over the refs/starred-changes/ namespace
this would result in performance issues.

On the other hand looking up the changes that were starred by a user
can be done via the change index so that we don't need to scan the
refs/starred-changes/ namespace in this case either.

Change-Id: Ib81d46283035ef753d35fbc78684ded9f074bd1f
Signed-off-by: Edwin Kempin <ekempin@google.com>
2016-04-18 08:39:46 +02:00
..