code: ServerContext setGlobalIndex(long globalIndex) {
      Assert.argNot(globalIndex < 0, "global index must be positive");
      this.globalIndex = Math.max(this.globalIndex, globalIndex);
      log.compactor().majorIndex(this.globalIndex - 1);
      return this;
    }
docs: Sets the global index.
  
  @param globalIndex The global index.
  @return The Raft context.