[MGNLPER-138] Find bar not working after changing outputUnits property Created: 24/Jun/20  Updated: 22/Jul/20  Resolved: 22/Jul/20

Status: Closed
Project: Periscope
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Chuong Doan Huy
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: 2d 0.5h
Original Estimate: Not Specified

Issue Links:
Relates
relation
is related to MLEARN-17 Concurrency issues in NN ranker Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Maintenance 14, Maintenance 15
Story Points: 5

 Description   

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)



 Comments   
Comment by Mikaël Geljić [ 22/Jul/20 ]

Confirming it was resolved & QA'd with MLEARN-17.

Generated at Mon Feb 12 10:29:06 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.