Skip to content

Error writing index in case of multiple rating files #132

Description

@agazzarini

Describe the bug
In case multiple rating file are found within the raings folder, RRE loads the corresponding corpora multiple times (once for each ratings file). In these scenarios an exception is thrown, probably related with the fact multiple writers try to index data.

To Reproduce
Steps to reproduce the behavior:

  1. Add multiple files in the ratings folder
  2. Run rre:evaluate

Expected behavior
The evaluation should happen separately for each ratings file.

Observed behavior
The evaluation happens only for the first rating file; after that, the exception below is thrown and the evaluation process stops.

Stacktrace

[ERROR] org.apache.solr.common.SolrException: /private/var/folders/g4/3splwc6j543551z38mnd86zw0000gn/T/1621406750085/main_v1.0/data/index/write.lock
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:217)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2576)
	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:227)
	at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:211)
	at io.sease.rre.search.api.impl.ApacheSolr.load(ApacheSolr.java:129)
	at io.sease.rre.core.Engine.lambda$prepareData$15(Engine.java:471)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at io.sease.rre.core.Engine.prepareData(Engine.java:469)
	at io.sease.rre.core.Engine.lambda$evaluate$5(Engine.java:236)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions