AMOOOMA commented on code in PR #41603:
URL: https://github.com/apache/beam/pull/41603#discussion_r4684768681
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/state/WindmillMultimap.java:
##########
@@ -375,6 +420,7 @@ public Iterable<V> read() {
it.extendWith(persistedValues);
keyState.values = it;
keyState.valuesSize = Iterables.size(persistedValues);
+ keyState.setValuesWeight(((Weighted) persistedValues).getWeight());
Review Comment:
Here we are only counting the values and not including the key size, should
we perhaps try to get it before calling necessaryKeyEntriesFromStorageFuture
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/windmill/state/WindmillStateInternalsTest.java:
##########
@@ -3859,6 +3859,76 @@ public void testCachedCombining() throws Exception {
Mockito.verifyNoMoreInteractions(mockReader);
}
+ @Test
+ public void testCachedMultimap() throws Exception {
Review Comment:
Once we updated to save the key weight like the previous commented suggested
we can probably add a unittest for the read only situation as well as coverage.
--
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]