[ https://issues.apache.org/jira/browse/LUCENE-5079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13694092#comment-13694092 ]
Yonik Seeley edited comment on LUCENE-5079 at 6/26/13 5:16 PM: --------------------------------------------------------------- bq. Do we need synchonization here? Perhaps just for the fact that the JMM doesn't guarantee we see the non-volatile long atomically? We could just make lastCommitChangeCount volatile I guess... edit: Actually, it depends on the exact semantics we're looking for. I guess I'll go with synchronized(this) for now for the greater safety. was (Author: ysee...@gmail.com): bq. Do we need synchonization here? Perhaps just for the fact that the JMM doesn't guarantee we see the non-volatile long atomically? We could just make lastCommitChangeCount volatile I guess... > allow IndexWriter user to tell if there are uncommitted changes. > ---------------------------------------------------------------- > > Key: LUCENE-5079 > URL: https://issues.apache.org/jira/browse/LUCENE-5079 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Yonik Seeley > Attachments: LUCENE-5079.patch > > > IndexWriter already currently tracks if there are uncommitted changes. We > should expose this somehow... perhaps a boolean hasUncommittedChanges()? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org