Remove wait_for_commit from POST /changes/X/revisions/Y/review

There are many REST endpoints that modify changes and need to block
for index writes to occur; there is nothing special about PostReview.

Change-Id: I1786999c1c172ebdf6accfaa9839201702e5f585
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index e2a8fbe..66abebf 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -3117,10 +3117,6 @@
 link:rest-api-accounts.html#account-id[\{account-id\}] the review
 should be posted on behalf of. To use this option the caller must
 have been granted `labelAs-NAME` permission for all keys of labels.
-|`wait_for_commit`|optional|
-Whether the request should wait for commit to the index to finish.
-If `false` (default) the request returns after the data is sent to
-the index, but searches may not immediately see the update.
 |============================
 
 [[reviewer-info]]
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java
index b26e9161..92e53ec 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java
@@ -100,8 +100,6 @@
      * not the caller.
      */
     public String onBehalfOf;
-
-    public boolean waitForCommit;
   }
 
   public static enum DraftHandling {
@@ -206,9 +204,7 @@
 
     Output output = new Output();
     output.labels = input.labels;
-    if (input.waitForCommit) {
-      indexWrite.checkedGet();
-    }
+    indexWrite.checkedGet();
     return output;
   }
 
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java
index 7af882e..e5eb567 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java
@@ -229,7 +229,6 @@
     review.labels = Maps.newTreeMap();
     review.drafts = PostReview.DraftHandling.PUBLISH;
     review.strictLabels = false;
-    review.waitForCommit = true;
     for (ApproveOption ao : optionList) {
       Short v = ao.value();
       if (v != null) {