Class OnlineReindexer<K,V,I extends Index<K,V>>

java.lang.Object
com.google.gerrit.server.index.OnlineReindexer<K,V,I>

public class OnlineReindexer<K,V,I extends Index<K,V>> extends Object
Background thread for running an index schema upgrade by reindexing all documents in an index using the new version. Intended to be run while Gerrit is serving traffic to prepare for a near-zero downtime upgrade.
  • Constructor Details

  • Method Details

    • start

      public void start()
      Starts the background process.
    • isRunning

      public boolean isRunning()
      Returns true if the background indexer is currently running.
    • getVersion

      public int getVersion()
      Returns the index version that this indexer is creating documents for.
    • activateIndex

      public void activateIndex()
      Switches the search index from the old version to the new version. This method should be called when the new version is fully ready.