jiangzzhu commented on code in PR #40870:
URL: https://github.com/apache/beam/pull/40870#discussion_r4447671360
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/restriction/DetectNewPartitionsRangeTracker.java:
##########
@@ -18,11 +18,14 @@
package org.apache.beam.sdk.io.gcp.spanner.changestreams.restriction;
import com.google.cloud.Timestamp;
+import org.apache.beam.sdk.transforms.splittabledofn.SplitResult;
+import org.checkerframework.checker.nullness.qual.Nullable;
/**
* This restriction tracker delegates most of its behavior to an internal
{@link
- * TimestampRangeTracker}. It has a different logic for tryClaim method. It
ignores claims for the
- * same timestamp multiple times.
+ * TimestampRangeTracker}. It has a different logic for {@link #tryClaim} and
{@link #trySplit}: it
+ * ignores claims for the same timestamp multiple times, and refuses
non-checkpoint dynamic splits
+ * so only a single active restriction polls and schedules new partitions.
*/
@SuppressWarnings({
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
Review Comment:
Done — removed `@SuppressWarnings("nullness")` and switched
`position.equals(lastAttemptedPosition)` to `Objects.equals(position,
lastAttemptedPosition)` so Checker Framework passes cleanly. Thanks for the
review!
--
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]