Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.2.0, 3.2.1
-
2
-
Sprint 89
Description
The queue.poll() invocation there yields no exception but null when the timeout elapses. This causes the following issues:
- hasNext() returning true when in reality no element is available
- next() returning a non-deterministic number of null elements tripping up processing of the query results, e.g.
2017-01-10 15:09:20,084+0100 ERROR [qtp172586730-295] admin org.sonatype.nexus.extdirect.internal.ExtDirectServlet - Failed to invoke action method: coreui_Component.read, java-method: org.sonatype.nexus.coreui.ComponentComponent.read java.lang.IllegalArgumentException: expected one element but was: <null, null, null, null, null, ...> at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:322) [com.google.guava:20.0.0] at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:294) [com.google.guava:20.0.0] at org.sonatype.nexus.repository.browse.internal.BrowseServiceImpl.getCount(BrowseServiceImpl.java:192) [na:na] at org.sonatype.nexus.repository.browse.internal.BrowseServiceImpl.browseComponents(BrowseServiceImpl.java:95) [na:na] at org.sonatype.nexus.repository.browse.BrowseService$browseComponents.call(Unknown Source) [na:na] at org.sonatype.nexus.coreui.ComponentComponent.read(ComponentComponent.groovy:126) [na:na]
- next() failing with NoSuchElementException although the caller previously checked hasNext() == true (next() calls hasNext() again and can observe a different value than the caller, like the end-of-query sentinel), e.g.
Suppressed: java.util.NoSuchElementException: Iterator depleted at org.sonatype.nexus.repository.storage.OrientAsyncHelper$QueueConsumingIterable.next(OrientAsyncHelper.java:202) [na:na] at org.sonatype.nexus.repository.storage.OrientAsyncHelper$QueueConsumingIterable.next(OrientAsyncHelper.java:1) [na:na] at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47) [com.google.guava:20.0.0] at org.sonatype.nexus.repository.maven.internal.PurgeUnusedSnapshotsFacetImpl.deleteUnusedSnapshotComponents(PurgeUnusedSnapshotsFacetImpl.java:165) [na:na]
Attachments
Issue Links
- fixes
-
NEXUS-12481 NullPointerException while rebuilding maven metadata if database operations timeout
-
- Closed
-
- is duplicated by
-
NEXUS-11982 browse mvn repository hangs
-
- Closed
-
- relates
-
NEXUS-12057 Poor performance from Nexus 3 "purge unused snapshots" task
-
- Closed
-