[ https://issues.apache.org/jira/browse/LUCENE-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972057#action_12972057 ]
Michael McCandless commented on LUCENE-2815: -------------------------------------------- Ugh, nice finds Yonik! We should fix these. Maybe MultiFields should just pre-build its Map<String,Term> on init? You're right, we do reuse MultiFields today (we stuff the instance of MultiFields onto the IndexReader with IndexReader.store/retrieveFields), but I wonder whether we really should? (In fact I thought at one point we decided to stop doing that... yet, we still are... can't remember the details; maybe perf hit was too high eg for MTQs/Solr facets/etc.). What do we need to do to make the publication safe? Is making IR.store/retrieveFields sync'd sufficient? Aside: Java concurrency is a *mess*. I understand why JMM is needed, to get good perf on modern CPUs, but allowing the low level CPU cache coherency requirements to bubble all the way up to complex requirements in the language itself, is a disaster. > MultiFields not thread safe > --------------------------- > > Key: LUCENE-2815 > URL: https://issues.apache.org/jira/browse/LUCENE-2815 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 4.0 > Reporter: Yonik Seeley > > MultiFields looks like it has thread safety issues -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org