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 ( something like "namespace:tag") and thus will be
the same InternedByteString. That is good for reducing objects/memory but
means that we can't use just the InternedByteString as the cache key here
because those two types will collide.
--
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]