jiangzzhu commented on code in PR #37326:
URL: https://github.com/apache/beam/pull/37326#discussion_r2700207850
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/action/QueryChangeStreamAction.java:
##########
@@ -303,14 +303,24 @@ public ProcessContinuation run(
throw e;
}
- LOG.debug("[{}] change stream completed successfully", token);
- if (tracker.tryClaim(endTimestamp)) {
+ LOG.debug(
+ "[{}] change stream completed successfully up to {}", token,
changeStreamQueryEndTimestamp);
+ if (!tracker.tryClaim(changeStreamQueryEndTimestamp)) {
+ return ProcessContinuation.stop();
+ }
+
+ if (changeStreamQueryEndTimestamp.equals(endTimestamp)) {
Review Comment:
This seems not correct if we have partition terminate case.
changeStreamQueryEndTimestamp will not be equal to endTimestamp for terminated
partition, so the partition will not be marked finished.
--
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]