stefanvodita opened a new pull request, #12454: URL: https://github.com/apache/lucene/pull/12454
`DefaultSortedSetDocValuesReaderState` has a cache of ordinal maps, but it only has one ordinal map in it at most. This PR preserves the functionality of the class, but removes `cachedOrdMaps`. We can't synchronise on the ordinal map itself, since it could be `null`, so we introduce an ordinal map lock instead. Overall, I like the previous code a bit better, it's cleaner and more concise, although `cachedOrdMaps` looks confusing at first. Maybe it just needs a comment explaining why using a map is convenient (we can synchronize on it, we can call `Accountables.namedAccountables` with it)? I'd like to hear what others think. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org