From 14ba39032f01aab233b24d969b79b7d9a8f066dd Mon Sep 17 00:00:00 2001 From: vam Date: Fri, 4 Jan 2019 16:22:06 -0800 Subject: [PATCH] Document default values for BatchingSettings. "Fixes" https://github.com/googleapis/gax-java/issues/543 --- .../google/api/gax/batching/BatchingSettings.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gax/src/main/java/com/google/api/gax/batching/BatchingSettings.java b/gax/src/main/java/com/google/api/gax/batching/BatchingSettings.java index a1585f4e9..766507d45 100644 --- a/gax/src/main/java/com/google/api/gax/batching/BatchingSettings.java +++ b/gax/src/main/java/com/google/api/gax/batching/BatchingSettings.java @@ -38,6 +38,11 @@ /** * Represents the batching settings to use for an API method that is capable of batching. * + *

By default the settings are configured to not use batching (i.e. the batch size + * threshold is 1). This is the safest default behavior, which has meaning in all possible + * scenarios. Users are expected to configure actual batching thresholds explicitly: the element + * count, request bytes count and delaydd. + * *

Warning: With the wrong settings, it is possible to cause long periods of dead waiting time. * *

When batching is turned on for an API method, a call to that method will result in the request @@ -50,12 +55,13 @@ * *

* *

These thresholds are treated as triggers, not as limits. Thus, if a request is made with 2x