tianz101 commented on code in PR #37326:
URL: https://github.com/apache/beam/pull/37326#discussion_r2718627518


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/action/QueryChangeStreamAction.java:
##########
@@ -179,10 +178,9 @@ public ProcessContinuation run(
     final String token = partition.getPartitionToken();
     final Timestamp startTimestamp = tracker.currentRestriction().getFrom();
     final Timestamp endTimestamp = partition.getEndTimestamp();
+    final boolean readToEndTimestamp = 
!endTimestamp.equals(MAX_INCLUSIVE_END_AT);
     final Timestamp changeStreamQueryEndTimestamp =
-        endTimestamp.equals(MAX_INCLUSIVE_END_AT)
-            ? getNextReadChangeStreamEndTimestamp()
-            : endTimestamp;
+        readToEndTimestamp ? endTimestamp : 
getNextReadChangeStreamEndTimestamp();

Review Comment:
   This PR that Xue is working on can get v1 and v2 indicator 
https://github.com/apache/beam/pull/36667.
   I will let you and Xue decide how much to address in this PR. Basically we 
should keep v1 behavior unchanged
   and v2 use now+2m always to minimize the risks of regression. 
   If isMutableChangeStream(), then it is v2, otherwise it is v1. It queries 
partition_mode to figure out v1 or v2.
   



-- 
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]

Reply via email to