[ 
https://issues.apache.org/jira/browse/SOLR-15122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17277399#comment-17277399
 ] 

Mike Drob commented on SOLR-15122:
----------------------------------

I'm pretty comfortable with that blanket statement. If you're using volatile, 
that means you expect multiple threads accessing, and if you have multiple 
threads writing then you shouldn't be using non-atomic postfix increment. If 
you can guarantee that you only have one writer, and the volatile is for the 
readers, then... maybe it's ok? It's still trappy and can lead to issues down 
the line.

I used AtomicInteger because we don't have a mutable Integer and needed an 
object anyway for the sync block. I can rewrite that with an Object and an int 
if you prefer.

> ClusterEventProducerTest.testEvents is unstable
> -----------------------------------------------
>
>                 Key: SOLR-15122
>                 URL: https://issues.apache.org/jira/browse/SOLR-15122
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Tests
>            Reporter: Mike Drob
>            Assignee: Andrzej Bialecki
>            Priority: Major
>             Fix For: master (9.0)
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This test looks to be unstable according to Jenkins since about Nov 5. I just 
> started seeing occasional failures locally when running the whole suite but 
> cannot reproduce when running in isolation.
> https://lists.apache.org/thread.html/rf0c16b257bc3236ea414be51451806352b55f15d4949f4fd54a3b71a%40%3Cbuilds.lucene.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to