docs(clients): ReadBulk timeout is one shared deadline for the command, not per tag

Stream E made the worker wait once for all uncached tags. Fix the Go, Python, Rust, Java
and .NET library docs and CLI help text, the proto comment (default is the worker's
1000 ms), and the worker design doc. Regenerated Contracts Generated/ and the Java
generated protos; both diffs are comment-only.
This commit is contained in:
Joseph Doherty
2026-10-22 08:46:29 -04:00
parent 3ffba83723
commit dd623356f4
13 changed files with 57 additions and 33 deletions
@@ -49125,11 +49125,15 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* reply returns the cached value WITHOUT modifying the existing
* subscription (was_cached = true).
* - Otherwise the worker takes the snapshot lifecycle itself: AddItem +
* Advise, wait up to `timeout_ms` for the first OnDataChange, then
* UnAdvise + RemoveItem before returning. The session is left exactly
* as it was before the call (was_cached = false).
* Advise, wait for the first OnDataChange, then UnAdvise + RemoveItem
* before returning. The session is left exactly as it was before the
* call (was_cached = false).
*
* `timeout_ms == 0` uses the gateway-configured default (1000 ms).
* `timeout_ms` is one deadline shared by the whole command, not a per-tag
* budget: the worker adds and advises every uncached tag, waits once for all
* of them, then tears them all down. A tag that has not delivered by the
* deadline gets its own was_successful = false result.
* `timeout_ms == 0` uses the worker's default (1000 ms).
* </pre>
*
* Protobuf type {@code mxaccess_gateway.v1.ReadBulkCommand}
@@ -49424,11 +49428,15 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* reply returns the cached value WITHOUT modifying the existing
* subscription (was_cached = true).
* - Otherwise the worker takes the snapshot lifecycle itself: AddItem +
* Advise, wait up to `timeout_ms` for the first OnDataChange, then
* UnAdvise + RemoveItem before returning. The session is left exactly
* as it was before the call (was_cached = false).
* Advise, wait for the first OnDataChange, then UnAdvise + RemoveItem
* before returning. The session is left exactly as it was before the
* call (was_cached = false).
*
* `timeout_ms == 0` uses the gateway-configured default (1000 ms).
* `timeout_ms` is one deadline shared by the whole command, not a per-tag
* budget: the worker adds and advises every uncached tag, waits once for all
* of them, then tears them all down. A tag that has not delivered by the
* deadline gets its own was_successful = false result.
* `timeout_ms == 0` uses the worker's default (1000 ms).
* </pre>
*
* Protobuf type {@code mxaccess_gateway.v1.ReadBulkCommand}
@@ -1262,7 +1262,7 @@ public final class MxGatewayCli implements Callable<Integer> {
@Option(
names = "--timeout-ms",
defaultValue = "0",
description = "Per-tag snapshot timeout in milliseconds (0 = worker default).")
description = "Snapshot deadline in milliseconds, shared by all tags in the command (0 = worker default, 1000 ms).")
int timeoutMs;
ReadBulkCommand(MxGatewayCliClientFactory clientFactory) {
@@ -1510,7 +1510,7 @@ public final class MxGatewayCli implements Callable<Integer> {
@Option(
names = "--timeout-ms",
defaultValue = "0",
description = "Per-tag snapshot timeout in milliseconds (0 = worker default).")
description = "Snapshot deadline in milliseconds, shared by all tags in the command (0 = worker default, 1000 ms).")
int timeoutMs;
@Option(names = "--iterations", defaultValue = "10", description = "Number of ReadBulk calls to perform.")
@@ -555,15 +555,17 @@ public final class MxGatewaySession implements AutoCloseable {
* {@code OnDataChange} value for any tag that is already advised
* ({@code wasCached == true}) without modifying the existing subscription,
* and falls back to a full AddItem + Advise + wait + UnAdvise + RemoveItem
* snapshot lifecycle otherwise. The supplied {@code timeout} bounds the
* per-tag wait in the snapshot case; pass {@link Duration#ZERO} (or
* {@code null}) to use the worker default (1000 ms). Per-tag failures
* snapshot lifecycle otherwise. The supplied {@code timeout} is one shared
* deadline for the whole command, not a per-tag budget: the worker advises
* every uncached tag, waits once for all of them, then tears them down.
* Pass {@link Duration#ZERO} (or {@code null}) to use the worker default
* (1000 ms). Per-tag failures
* appear as {@link BulkReadResult} entries with {@code wasSuccessful == false};
* this method does not throw for per-tag MXAccess failures.
*
* @param serverHandle the {@code ServerHandle} owning the items
* @param tagAddresses the tag addresses to read
* @param timeout per-tag snapshot timeout (zero or null = worker default)
* @param timeout snapshot deadline shared by all tags in the command (zero or null = worker default)
* @return a per-tag {@link BulkReadResult} list
* @throws MxGatewayException on transport or protocol failure
* @throws NullPointerException if {@code tagAddresses} is {@code null}