Issue 2996: Impossible to remove deleted draft change from index
Status:  Released
Owner: ----
Closed:  Nov 2014
Project Member Reported by huga...@gmail.com, Oct 30, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:
2.9.1

Normally, Lucene is kept up to date and no manual indexing is required. 

We have a active/hot-stand-by topology for Gerrit master and since those 2 gerrit instances do not share the lucene index, the index on the hot-stand-by is always out-of-date.

We use the REST api to keep the lucene index of the hot-stand-by up to date but when a draft change is deleted, there is no way to index(remove) that change because the change no longer exist in the DB.

What steps will reproduce the problem?
1.Create a draft
2.back up the index folder(Make sure the index got flushed to the disk, every 5 min by default if not specified in gerrit.config) 
3.Delete the draft change
4.Stop Gerrit
5.Replace the index folder by the back up created at step 2.
6.Start Gerrit
7.Call the REST API to index the change /changes/<change id>/index

What is the expected output? What do you see instead?
404 is returned and the change is not removed from the index.
I would like that the change gets removed from the index if the change no longer exist in the db when I call the index endpoint.


Please provide any additional information below.

Oct 30, 2014
Project Member #1 huga...@gmail.com
https://gerrit-review.googlesource.com/#/c/61162/
Status: ChangeUnderReview
Nov 12, 2014
Project Member #2 huga...@gmail.com
will be available in 2.9.2
Status: Submitted
Labels: FixedIn-2.9
Nov 12, 2014
Project Member #3 david.pu...@sonymobile.com
(No comment was entered for this change.)
Labels: -FixedIn-2.9 FixedIn-2.9.2
Nov 30, 2014
Project Member #4 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Released