arunpandianp commented on code in PR #37964:
URL: https://github.com/apache/beam/pull/37964#discussion_r3086772821
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java:
##########
@@ -299,29 +356,47 @@ public static <T> Block<T> mutatedBlock(WeightedList<T>
values) {
}
public static <T> Block<T> fromValues(List<T> values, @Nullable
ByteString nextToken) {
- return fromValues(WeightedList.of(values, Caches.weigh(values)),
nextToken);
+ long listWeight = values.size() * Caches.REFERENCE_SIZE;
Review Comment:
Will it be useful to move this logic inside `Caches.weigh`? `Caches.weigh`
could check if the object is an list/collection and compute weights using this
logic.
--
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]