Skip to content

Commit

Permalink
Reduce default batching interval
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
emilymye authored and modular-magician committed Dec 28, 2019
1 parent 9188e8c commit 0c071d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion google/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
6 changes: 4 additions & 2 deletions website/docs/guides/provider_reference.html.markdown
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

0 comments on commit 0c071d6

Please sign in to comment.