scwhittle commented on code in PR #36743:
URL: https://github.com/apache/beam/pull/36743#discussion_r2498563882


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/state/CachingStateTable.java:
##########
@@ -65,20 +72,52 @@ private CachingStateTable(Builder builder) {
     }
   }
 
-  static CachingStateTable.Builder builder(
+  static Builder builder(
       String stateFamily,
       WindmillStateReader reader,
       ForKeyAndFamily cache,
       boolean isNewKey,
       Supplier<Closeable> scopedReadStateSupplier,
       WindmillStateTagUtil windmillStateTagUtil) {
-    return new CachingStateTable.Builder(
+    return new Builder(
         stateFamily, reader, cache, scopedReadStateSupplier, isNewKey, 
windmillStateTagUtil);
   }
 
-  @Override
+  /**
+   * Gets the {@link State} in the specified {@link StateNamespace} with the 
specified {@link
+   * StateTag}, binding it using the {@link #binderForNamespace} if it is not 
already present in
+   * this {@link CachingStateTable}.
+   */
+  public <StateT extends State> StateT get(
+      StateNamespace namespace, StateTag<StateT> tag, StateContext<?> c) {
+
+    Equivalence.Wrapper<StateTag<?>> tagById = 
StateTags.ID_EQUIVALENCE.wrap(tag);

Review Comment:
   That looks like an oversight and a bug.  Maybe you create a unit test test 
that will have a tag that will collide and verify it is currently broken 
behavior?



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