How do I _really_ flush caches?

148 views
Skip to first unread message

Matthew Webber

unread,
Jan 2, 2018, 12:24:28 PM1/2/18
to Repo and Gerrit Discussion
In the Web UI, I go to a change of mine, and click to add a reviewer. I then type a single letter "h", and the auto-complete offers me 4 names (people whose name starts with H).

However, on the server side, an exception is thrown:
[2018-01-02 16:40:24,610] [HTTP-64] ERROR com.google.gerrit.server.ReviewerRecommender : Exception while suggesting reviewers
com
.google.gerrit.server.query.QueryParseException: User 1000061 not found

User 1000061 was a duplicate account, set up in error, that I manually deleted from the SQL database. It's gone from all tables. I've run this:
ssh -p 29418 gerrit.xxx.ac.uk gerrit flush-caches --all
yet the exception keeps getting thrown.
Restarting Gerrit does no make the problem go away. 

So how do I make Gerrit understand that, as per the SQL database, that account does not exist? This is Gerrit 2.14.6.

Thanks
Matthew

Matthew Webber

unread,
Jan 2, 2018, 12:28:17 PM1/2/18
to Repo and Gerrit Discussion
ssh -p 29418 gerrit.xxx.ac.uk gerrit flush-caches --all

I should also say that if you do this sequence:
show-caches
flush-caches
show-caches

Then you would expect (on a lightly loaded system) the cache counts to be 0 (or close to it) immediately after the flush. I don't see that - is that expected?

Edwin Kempin

unread,
Jan 2, 2018, 12:55:25 PM1/2/18
to Matthew Webber, Repo and Gerrit Discussion
If you manually do account updates in the database you must reindex the accounts so that the account data in Lucene is updated.


--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Webber

unread,
Jan 2, 2018, 4:36:00 PM1/2/18
to Repo and Gerrit Discussion

If you manually do account updates in the database you must reindex the accounts so that the account data in Lucene is updated.
Thanks, that works.
Matthew 

rober...@verbsurgical.com

unread,
Sep 12, 2018, 10:17:24 AM9/12/18
to Repo and Gerrit Discussion
Hi--

I am seeing this in our gerrit instance as well, with a similar scenario (manual manipulation of accounts and account_external_ids tables). However, I am still seeing the problem. This is what I tried:

ssh gerrit gerrit flush-caches

ssh gerrit gerrit index start accounts
Nothing to reindex, index is already the latest version

ssh gerrit gerrit index activate accounts
Not activating index, already using latest version

ssh gerrit gerrit index start accounts --force
Reindexer started

However, the same exceptions still appear when using the web UI auto-complete:

[2018-09-12 07:11:31,254] [HTTP-260] ERROR com.google.gerrit.server.ReviewerRecommender : Exception while suggesting reviewers
com.google.gerrit.server.query.QueryParseException: User 1000410 not found
        at com.google.gerrit.server.query.QueryBuilder.error(QueryBuilder.java:315)

Our gerrit server will restart tonight, so I will look again then, but are there any other things to try? 

Thanks,
--Rob
Reply all
Reply to author
Forward
0 new messages