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
This commit is contained in:
Dave Borowitz 2013-10-03 08:54:28 -07:00
parent c3b436de36
commit 50ceb44fc3
3 changed files with 1 additions and 10 deletions

View File

@ -3117,10 +3117,6 @@ If not set, the default is `ALL`.
link:rest-api-accounts.html#account-id[\{account-id\}] the review link:rest-api-accounts.html#account-id[\{account-id\}] the review
should be posted on behalf of. To use this option the caller must should be posted on behalf of. To use this option the caller must
have been granted `labelAs-NAME` permission for all keys of labels. 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]] [[reviewer-info]]

View File

@ -100,8 +100,6 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
* not the caller. * not the caller.
*/ */
public String onBehalfOf; public String onBehalfOf;
public boolean waitForCommit;
} }
public static enum DraftHandling { public static enum DraftHandling {
@ -206,9 +204,7 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
Output output = new Output(); Output output = new Output();
output.labels = input.labels; output.labels = input.labels;
if (input.waitForCommit) {
indexWrite.checkedGet(); indexWrite.checkedGet();
}
return output; return output;
} }

View File

@ -229,7 +229,6 @@ public class ReviewCommand extends SshCommand {
review.labels = Maps.newTreeMap(); review.labels = Maps.newTreeMap();
review.drafts = PostReview.DraftHandling.PUBLISH; review.drafts = PostReview.DraftHandling.PUBLISH;
review.strictLabels = false; review.strictLabels = false;
review.waitForCommit = true;
for (ApproveOption ao : optionList) { for (ApproveOption ao : optionList) {
Short v = ao.value(); Short v = ao.value();
if (v != null) { if (v != null) {