Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce default batching interval #2892

Merged
merged 2 commits into from
Dec 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
2 changes: 1 addition & 1 deletion build/terraform-mapper
2 changes: 1 addition & 1 deletion third_party/terraform/utils/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/errwrap"
)

const defaultBatchSendIntervalSec = 10
const defaultBatchSendIntervalSec = 3

// RequestBatcher is a global batcher object that keeps track of
// existing batches.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ Values are expected to include the version of the service, such as
`https://www.googleapis.com/compute/v1/`.

* `batching` - (Optional) This block controls batching GCP calls for groups of specific resource types. Structure is documented below.
~>**NOTE**: Batching is not implemented for the majority or resources/request types and is bounded by the core [`-parallelism`](https://www.terraform.io/docs/commands/apply.html#parallelism-n) flag. Adding or changing this config likely won't affect a Terraform run at all unless the user is creating enough of a particular type of resource to run into quota issues.
~>**NOTE**: Batching is not implemented for the majority or resources/request types and is bounded by two values. If you are running into issues with slow batches
resources, you may need to adjust one or both of 1) the core [`-parallelism`](https://www.terraform.io/docs/commands/apply.html#parallelism-n) flag, which controls how many concurrent resources are being operated on and 2) `send_after`, the time interval after which a batch is sent.

* `request_timeout` - (Optional) A duration string controlling the amount of time
the provider should wait for a single HTTP request. This will not adjust the
Expand All @@ -120,7 +121,8 @@ timeout blocks for that.
The `batching` fields supports:

* `send_after` - (Optional) A duration string representing the amount of time
after which a request should be sent. Defaults to 10s.
after which a request should be sent. Defaults to 3s. Note that if you increase
`parallelism` you should also increase this value.

* `enable_batching` - (Optional) Defaults to true. If false, disables batching
so requests that have batching capabilities are instead is sent one by one.
Expand Down