acrites commented on code in PR #30317:
URL: https://github.com/apache/beam/pull/30317#discussion_r1635173186


##########
sdks/java/harness/src/test/java/org/apache/beam/fn/harness/state/FakeBeamFnStateClient.java:
##########
@@ -47,6 +60,7 @@ public class FakeBeamFnStateClient implements 
BeamFnStateClient {
   private static final int DEFAULT_CHUNK_SIZE = 6;
   private final Map<StateKey, List<ByteString>> data;
   private int currentId;
+  private final Map<StateKey, NavigableSet<Long>> 
orderedListSortKeysFromStateKey;

Review Comment:
   This seems like a pretty inefficient data structure to use. You might look 
at `SortedSet` (which requires adding a deduplicating id) unless we can use 
`SortedMultiset` from Guava. This would allow us to do things like remove all 
elements in a range without first copying over all keys in the range and then 
removing them one by one (which requires a hash each time).



-- 
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]

Reply via email to