We're updating the issue view to help you get more done. 

SyncWorkProcessor leads to NoSuchElementException on empty WorkList

Description

Most likely due to an empty List<LuceneWork> being passed.
I could not spot where such an empty list would be passed by the upper stack.

From Matt:

1 2 3 4 5 6 7 8 9 10 Running my usual local test, I constantly see the following issues on my master node and my JMS queue's freeze during the persistence of an entity and pretty much always during reindexing. 15:06:14,724 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) Exception in thread "Hibernate Search sync consumer thread for index com.acme.User" java.util.NoSuchElementException 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at java.util.ArrayList$Itr.next(ArrayList.java:834) 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at org.hibernate.search.backend.impl.lucene.ChangesetList$WorkIterator.next(ChangesetList.java:85) 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at org.hibernate.search.backend.impl.lucene.ChangesetList$WorkIterator.next(ChangesetList.java:61) 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at org.hibernate.search.backend.impl.lucene.ChangesetList.copyToList(ChangesetList.java:98) 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:147) 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:138) 15:06:14,725 ERROR [stderr] (Hibernate Search sync consumer thread for index com.acme.User) at java.lang.Thread.run(Thread.java:744)

Environment

None

Status

Assignee

Emmanuel Bernard

Reporter

Emmanuel Bernard

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

5.0.0.Final
4.4.6.Final

Priority

Major