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


##########
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:
   > For example if we have a StateTag StateTag for the same "tag", I believe 
the bytestring for both would be the same and we could collide in the cache.
   
   I don't understand this, could you share examples? 
   
   Replacing NamespacedTag with InternedByteString should be same except that 
InternedByteString also includes the system/user prefix. So I think it should 
not break anything.
   
   



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