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


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/state/WindmillStateCache.java:
##########
@@ -225,24 +225,23 @@ public long getWeight() {
 
   /** Entry in the state cache that stores a map of values. */
   private static class StateCacheEntry implements Weighted {
-    private final HashMap<NamespacedTag<?>, WeightedValue<?>> values;
+    private final IdentityHashMap<InternedByteString, WeightedValue<?>> values;

Review Comment:
   sorry that was indeed a confusing comment :)
   
   I meant for example a StateTag representing a Value and a StateTag 
representing a Bag.  Both could be in the same namespace, DoFn, and have the 
same string tag.  At the work item commit level we are putting this ByteString 
into the correct value/bag proto as the tag field.  But the actual contents of 
the field will be the same or something like "namespace:tag" and will be the 
same InternedByteString causing collisions between these two types of tags in 
the cache.



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