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:
parent
c3b436de36
commit
50ceb44fc3
@ -3117,10 +3117,6 @@ If not set, the default is `ALL`.
|
||||
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]]
|
||||
|
@ -100,8 +100,6 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
|
||||
* not the caller.
|
||||
*/
|
||||
public String onBehalfOf;
|
||||
|
||||
public boolean waitForCommit;
|
||||
}
|
||||
|
||||
public static enum DraftHandling {
|
||||
@ -206,9 +204,7 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
|
||||
|
||||
Output output = new Output();
|
||||
output.labels = input.labels;
|
||||
if (input.waitForCommit) {
|
||||
indexWrite.checkedGet();
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,6 @@ public class ReviewCommand extends SshCommand {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user