You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/03/21 10:24:13 UTC

[GitHub] [beam] scwhittle commented on a change in pull request #17121: [BEAM-13015] Avoid repeated weighing of StateKey in StateFetchingIterator cache usage.

scwhittle commented on a change in pull request #17121:
URL: https://github.com/apache/beam/pull/17121#discussion_r830946109



##########
File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java
##########
@@ -84,10 +83,7 @@ private StateFetchingIterators() {}
       StateRequest stateRequestForFirstChunk,
       Coder<T> valueCoder) {
     return new CachingStateIterable<>(
-        (Cache<StateKey, Blocks<T>>) cache,
-        beamFnStateClient,
-        stateRequestForFirstChunk,
-        valueCoder);
+        (Cache<Object, Blocks<T>>) cache, beamFnStateClient, stateRequestForFirstChunk, valueCoder);

Review comment:
       Done.
   Instead of weighting the singleton instance I report zero since the weight will be counted many times in separate subcaches. Added comment with reasoning.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org