scwhittle commented on code in PR #37718:
URL: https://github.com/apache/beam/pull/37718#discussion_r2917902719
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/dofn/ReadChangeStreamPartitionDoFnTest.java:
##########
@@ -68,6 +68,7 @@ public class ReadChangeStreamPartitionDoFnTest {
Timestamp.ofTimeSecondsAndNanos(10, 20);
private static final Timestamp PARTITION_END_TIMESTAMP =
Timestamp.ofTimeSecondsAndNanos(30, 40);
private static final long PARTITION_HEARTBEAT_MILLIS = 30_000L;
+ private static final boolean CANCEL_QUERY_ON_HEARTBEAT = false;
Review Comment:
nit: have it equal true? otherwise the variable name is the opposite and it
doesn't matter for the test
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java:
##########
@@ -1912,6 +1936,17 @@ public ReadChangeStream
withUsingPlainTextChannel(boolean plainText) {
return
withUsingPlainTextChannel(ValueProvider.StaticValueProvider.of(plainText));
}
+ /**
+ * Configures the change stream to checkpoint and flush output targeting
low latency at the cost
+ * of higher rpc rate and cpu usage.
+ */
+ public ReadChangeStream withLowLatency() {
+ return toBuilder()
+ .setHeartbeatMillis(DEFAULT_LOW_LATENCY_DEFAULT_HEARTBEAT_MILLIS)
Review Comment:
add a comment on why we do both?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]