Page MenuHomePhabricator

Investigate changes having a wrong server id
Open, Needs TriagePublic

Description

During a full reindexing, Gerrit complained about some changes having the wrong server id:

[2022-11-17 10:53:25,655]
[Index-Batch-20[java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@29d1d09d[
  Not completed, task = java.util.concurrent.Executors$RunnableAdapter@7f184ee7[
    Wrapped task = com.google.gerrit.server.logging.LoggingContextAwareRunnable@5d906570]]]]
WARN  com.google.gerrit.server.index.change.AllChangesIndexer : Failed to read change 218499 for indexing
com.google.gerrit.server.notedb.InvalidServerIdException: invalid server id,
expected e9e9afe9-4712-486d-8885-f54b72dd1951:
actual: 173816e5-2b9a-37c3-8a2e-48639d4f1153

Event Timeline

We have gerrit.serverId set to e9e9afe9-4712-486d-8885-f54b72dd1951 since December 2016 commit 15bc9b80a7a91c54567d3fb63442ac13c955e603.

Tyler found 1003873@173816e5-2b9a-37c3-8a2e-48639d4f1153 in /srv/git/operations/software/gerrit/plugins/quota.git . That is the instance id from Google Gerrit instance.

The upstream thread "invalid server id" error occurs when updating index after upgrade mentions gerrit.importedServerId and it is documentation state:

If this value is not set, all changes imported from other Gerrit servers will be ignored.

That was introduced in Gerrit 3.7. https://www.gerritcodereview.com/3.7.html#import-projects-changes-from-other-gerrit-servers

We have no use case currently to import changes from another Gerrit instance and thus the error can be ignored. The message could be nicer though. Maybe that was done as part of implementing gerrit.importedServerId and that can be verified from the code or once we upgrade to 3.7.