Files
gerrit/gerrit-server/src/main/java
Shawn Pearce 5a5bd9ae66 Don't delete missing changes from secondary index
This is a partial revert of 903be04b02.

With the NoteDb migration ChangeFinder is querying the secondary
index to map from Change.Id to verify a change exists and locate
the project the change's metadata is stored in. If a change is not
found in the secondary index there is no need to delete the change,
as it does not exist in the secondary index.

Some secondary index implementations (notably the one at Google
behind gerrit-review) implement delete by appending a negative
assertion into the index, stating the document does not exist.
Each failed lookup appends more negative assertions into the index,
which can cause problems when there is replication delay between
multi-master instances.

Stop sending delete calls to the secondary index when ChangeFinder
got no results. Leave the index alone. The parse() methods are
typically invoked by GET calls, which should not be modifying
server state.

Change-Id: Iafd89324f9945dd827c37fec2d2ac54b89fc4e4a
2016-03-08 10:42:59 -08:00
..