reindexing slow in gerrit 2.9

233 views
Skip to first unread message

Serdar Asan

unread,
Aug 11, 2014, 7:04:31 AM8/11/14
to repo-d...@googlegroups.com

hi,

we have upgraded to gerrit 2.9 last weekend.
for reindexing we have executed the command "java -jar gerrit.war reindex --recheck-mergeable -d site_path" but it did not finish successfully:
 Reindexing changes: projects: 100% (41/41), 4% (11446/239031), done
 Reindexed 11446 changes in 33275.7s (0.3/s)

It seems that indexing was not successful for all changes and we might have to retrigger reindexing.
We restarted reindexing, but after 20% of the changes it is getting slower and slower.

Q1: Is it possible to disable Lucene index in gerrit 2.9
Q2: What is the reason that reindexing is getting slower? How can it be accelerated?

Thank you and regards,
Serdar.

Vlad Canţîru

unread,
Aug 11, 2014, 9:58:51 AM8/11/14
to Serdar Asan, repo-d...@googlegroups.com
 Hi,

 The reindex operation can take quite a long time if your system has a large number of changes. Also not every repository has the same number of review changes and as a result you might see this slowdown effect.
For such cases like yours what I would do is to take a copy of db and gits in a separate environment and run reindex operation there.
When done, copy the content index directory to production and proceed with the upgrade (without reindexing). There will obviously be some latest changes missing (those will not be visible in WebUI) but you can reindex them quickly when your production 2.9 is up by using REST API reindex command (I think this option is not documented still):
curl --user username:pasword -X POST http://hostname/a/changes/$CHANGE/index

Identify the number of changes to reindex and run all off them one by one in a loop using above command, this shouldn't be a long lasting operation.

Hope this helps,
Vladimir Cantiru


--
--
To unsubscribe, email repo-discuss...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages