Uploaded image for project: 'Periscope'
  1. Periscope
  2. MGNLPER-138

Find bar not working after changing outputUnits property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • None
    • 1.2.1
    • Maintenance 14, Maintenance 15
    • 5

      Steps to reproduce

      Expected results
      Get results from the search and no exceptions in the logs

      Actual results
      search failed -> "No results message on UI".

      Workaround
      No found. If the instance is restarted it will fail again after some searches.

      Development notes
      I was able to reproduce the issue, I get three different exceptions but I am not able to determine the exact cause of each exception, since the steps are always the same:

      2020-06-23 17:54:17,900 ERROR gnolia.admincentral.findbar.search.ResultCollector: An error occurred during the search process, therefore an empty collection will be returned.
      java.util.concurrent.CompletionException: java.lang.RuntimeException: java.lang.NullPointerException
      	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_71]
      	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_71]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) ~[?:1.8.0_71]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_71]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_71]
      	at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_71]
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException
      	at info.magnolia.periscope.Periscope.lambda$search$1(Periscope.java:125) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.periscope.search.SearchRunner.lambda$execute$0(SearchRunner.java:85) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[?:1.8.0_71]
      	... 3 more
      Caused by: java.lang.NullPointerException
      	at org.apache.commons.collections4.map.AbstractLinkedMap.firstKey(AbstractLinkedMap.java:186) ~[commons-collections4-4.4.jar:4.4]
      	at info.magnolia.periscope.rank.ml.IndexedBuffer.add(IndexedBuffer.java:64) ~[magnolia-periscope-result-ranker-1.2.jar:?]
      	at info.magnolia.periscope.rank.ml.NeuralNetworkResultRanker.lambda$addResults$1(NeuralNetworkResultRanker.java:98) ~[magnolia-periscope-result-ranker-1.2.jar:?]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_71]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_71]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_71]
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_71]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_71]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_71]
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_71]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_71]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_71]
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_71]
      	at info.magnolia.periscope.rank.ml.NeuralNetworkResultRanker.addResults(NeuralNetworkResultRanker.java:97) ~[magnolia-periscope-result-ranker-1.2.jar:?]
      	at info.magnolia.periscope.Periscope.fetchSupplierAwareSearchResults(Periscope.java:141) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.periscope.Periscope.lambda$null$0(Periscope.java:123) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.context.AsynchronousContext$OperationFactory.lambda$wrap$0(AsynchronousContext.java:122) ~[magnolia-core-6.2.2-SNAPSHOT.jar:?]
      	at info.magnolia.periscope.Periscope.lambda$search$1(Periscope.java:123) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.periscope.search.SearchRunner.lambda$execute$0(SearchRunner.java:85) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[?:1.8.0_71]
      	... 3 more
      
      2020-06-24 09:47:12,937 ERROR gnolia.admincentral.findbar.search.ResultCollector: An error occurred during the search process, therefore an empty collection will be returned.
      java.util.concurrent.CompletionException: java.lang.RuntimeException: java.lang.IllegalStateException: Entry.next=null, data[removeIndex]=southAmerica=231 previous=mosque=257 key=Tour value=-1 size=300 maxSize=300 This should not occur if your keys are immutable, and you have used synchronization properly.
      	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_71]
      	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_71]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) ~[?:1.8.0_71]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_71]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_71]
      	at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_71]
      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Entry.next=null, data[removeIndex]=southAmerica=231 previous=mosque=257 key=Tour value=-1 size=300 maxSize=300 This should not occur if your keys are immutable, and you have used synchronization properly.
      	at info.magnolia.periscope.Periscope.lambda$search$1(Periscope.java:125) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.periscope.search.SearchRunner.lambda$execute$0(SearchRunner.java:85) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[?:1.8.0_71]
      	... 3 more
      Caused by: java.lang.IllegalStateException: Entry.next=null, data[removeIndex]=southAmerica=231 previous=mosque=257 key=Tour value=-1 size=300 maxSize=300 This should not occur if your keys are immutable, and you have used synchronization properly.
      	at org.apache.commons.collections4.map.LRUMap.reuseMapping(LRUMap.java:384) ~[commons-collections4-4.4.jar:4.4]
      	at org.apache.commons.collections4.map.LRUMap.addMapping(LRUMap.java:349) ~[commons-collections4-4.4.jar:4.4]
      	at org.apache.commons.collections4.map.AbstractHashedMap.put(AbstractHashedMap.java:289) ~[commons-collections4-4.4.jar:4.4]
      	at info.magnolia.periscope.rank.ml.IndexedBuffer.add(IndexedBuffer.java:65) ~[magnolia-periscope-result-ranker-1.2.jar:?]
      	at info.magnolia.periscope.rank.ml.NeuralNetworkResultRanker.lambda$addResults$1(NeuralNetworkResultRanker.java:98) ~[magnolia-periscope-result-ranker-1.2.jar:?]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_71]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_71]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_71]
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_71]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_71]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_71]
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_71]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_71]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_71]
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_71]
      	at info.magnolia.periscope.rank.ml.NeuralNetworkResultRanker.addResults(NeuralNetworkResultRanker.java:97) ~[magnolia-periscope-result-ranker-1.2.jar:?]
      	at info.magnolia.periscope.Periscope.fetchSupplierAwareSearchResults(Periscope.java:141) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.periscope.Periscope.lambda$null$0(Periscope.java:123) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.context.AsynchronousContext$OperationFactory.lambda$wrap$0(AsynchronousContext.java:122) ~[magnolia-core-6.2.2-SNAPSHOT.jar:?]
      	at info.magnolia.periscope.Periscope.lambda$search$1(Periscope.java:123) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at info.magnolia.periscope.search.SearchRunner.lambda$execute$0(SearchRunner.java:85) ~[magnolia-periscope-core-1.2.1.jar:?]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[?:1.8.0_71]
      	... 3 more
      

      And

      2020-05-27 09:15:22,064 ERROR gnolia.admincentral.findbar.search.ResultCollector: An error occurred during the search process, therefore an empty collection will be returned
      java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Unable to get linear index 3000: values is greater than length (3000)
      at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_141]
      

      These errors might be related to memory cache or similar when the data is wiped out.

      (Tested with outputUnits= 10, 200 and 3000)

        Acceptance criteria

              chuong.doan Chuong Doan Huy
              miruela Mercedes Iruela
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 2d 0.5h
                    2d 0.5h