javanna commented on code in PR #15574:
URL: https://github.com/apache/lucene/pull/15574#discussion_r3266577116


##########
lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java:
##########
@@ -277,28 +293,31 @@ private FirstPassGroupingCollector<?> 
createRandomFirstPassCollector(
       String groupField, Sort groupSort, int topDocs) throws IOException {
     if (random().nextBoolean()) {
       ValueSource vs = new BytesRefFieldSource(groupField);
-      return new FirstPassGroupingCollector<>(
-          new ValueSourceGroupSelector(vs, new HashMap<>()), groupSort, 
topDocs);
+      Map<Object, Object> context = new HashMap<>();

Review Comment:
   I realized now that actually, if all collectors share the same map, it needs 
to handle concurrency. I am not too familiar with how this map is used. We 
probably don't see failures because it's always empty in your testing? 
Depending on its purpose, we may want to either go back to one map per 
collector, or using a concurrent hash map. I think that the former would be ok 
in this case. Sorry about the confusion.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to