df10d85174
When Gerrit needs to exit because of a SIG-HUP, we need to make sure to drain all pending threads that have outstanding indexing operations not yet flushed to disk. This does not have to be confused with the index close which may happen during on-line reindexing and needs to preserve the current indexing executor. This is a rework of I6ec90eb73 and I7bda13058 with an alternative approach that keeps both index consistency across restarts and on-line reindexing. Bug: Issue 5200 Bug: Issue 4618 Change-Id: Id332ec0215de4777fabef6ca310c510ba90c9760