tianz101 commented on code in PR #37459:
URL: https://github.com/apache/beam/pull/37459#discussion_r2760488763
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/action/QueryChangeStreamAction.java:
##########
@@ -379,4 +387,16 @@ private Timestamp getNextReadChangeStreamEndTimestamp() {
final Timestamp current = Timestamp.now();
return Timestamp.ofTimeSecondsAndNanos(current.getSeconds() + 2 * 60,
current.getNanos());
}
+
+ // For Mutable Change Stream, Spanner only allow the max query end timestamp
to be 30 minutes in
+ // the future.
+ private Timestamp getBoundedQueryEndTimestamp(Timestamp endTimestamp) {
+ if (this.isMutableChangeStream) {
+ final Timestamp current = Timestamp.now();
+ Timestamp maxTimestamp =
Review Comment:
For v1 we use endTs,
For v2 we should use getNextReadChangeStreamEndTimestamp() here so that for
V2, bounded endTs or unbounded endTs have similar query patterns.
--
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]