[
https://issues.apache.org/jira/browse/BEAM-13354?focusedWorklogId=690187&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-690187
]
ASF GitHub Bot logged work on BEAM-13354:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Dec/21 17:08
Start Date: 03/Dec/21 17:08
Worklog Time Spent: 10m
Work Description: lukecwik commented on a change in pull request #16092:
URL: https://github.com/apache/beam/pull/16092#discussion_r762107219
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/MultimapUserState.java
##########
@@ -65,13 +62,11 @@
private boolean isClosed;
private boolean isCleared;
// Pending updates to persistent storage
- private HashSet<K> pendingRemoves = Sets.newHashSet();
- private HashMap<K, List<V>> pendingAdds = Maps.newHashMap();
- // Map keys with no values in persistent storage
- private HashSet<K> negativeCache = Sets.newHashSet();
Review comment:
Storing the empty iterable in persistedValues can represent the negative
cache as well since the underlying PrefetchableIterable caches the first page
and hence iterating over it is cheap.
This also ties in with a future change where more of the
PrefetchableIterable is cached.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 690187)
Time Spent: 40m (was: 0.5h)
> Java SDK Harness MultimapUserState not using structural value when comparing
> keys
> ---------------------------------------------------------------------------------
>
> Key: BEAM-13354
> URL: https://issues.apache.org/jira/browse/BEAM-13354
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-harness
> Affects Versions: 2.35.0
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: P2
> Fix For: 2.36.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> The user state implementation is using non-structural value comparisons which
> doesn't work for certain types like byte[].
> https://github.com/apache/beam/blob/9b0032051b9fee83ac864fd70134915237ed2756/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/MultimapUserState.java#L68
--
This message was sent by Atlassian Jira
(v8.20.1#820001)