[Mulgara-general] [mulgara-general] TuplesException in an ITQL count operation

Rich d'Rich rich.d.rich at gmail.com
Mon Jan 28 22:39:28 UTC 2013


Hi Paul,

The subquery I logged finds two records e.g:

"subject","title","type"
info:fedora/qsr-part:16320,"Register Record for former Canterbury
Public Library, 1900s and 1920s section, 109 Cambridge Terrace,
Christchurch",part
info:fedora/qsr-part:627,"Building Record Form for former Canterbury
Public Library, 1900s and 1920s section, 109 Cambridge Terrace,
Christchurch",part


When the count query works correctly, I get a result like:

"k0"
2

There are other cases where there are no records found and a count of
zero, but I don't know if they ever trigger this problem.

--

Richard


On 29 January 2013 11:06, Paul Gearon <gearon at ieee.org> wrote:

> This looks like a problem I've had before where empty results lose their
> columns names. If that's the case, then I can work around it. However,
> there should be a single row answer for this kind of query, even if it's
> just a count of 0, so that may not be the problem.
>
> Do you know how large the result set is in this case? I'm presuming it's
> not empty?
>
> Paul
>
>
> On Mon, Jan 28, 2013 at 3:05 PM, Rich d'Rich <rich.d.rich at gmail.com>wrote:
>
>> We're using Mulgara 2.1.4 (embedded in Fedora 3.5) and getting an
>> occasional issue on our production repo.
>>
>> The problem manifests when we execute a query of the form:
>> *select count(subquery) from <#ri> where $a $b $c*
>>
>> Normally this query runs fine, but occasionally it will fail with a
>> TuplesException (see log below). After that, each call to that query will
>> fail with the same exception.
>> Executing "subquery" on its own works, and the problem is cleared by a
>> restart of the (tomcat) container.
>>
>> It looks like the state/query is being cached such that any further
>> textually identical queries trigger the bug?
>>
>> Any suggestions would be welcomed.
>>
>> *LOG:*
>> ERROR 2012-12-11 09:31:24.075 [http-8080-9] (RISearchServlet) Unexpected
>> error servicing API-A request
>> org.trippi.TrippiException: Transaction error
>>         at
>> org.trippi.impl.mulgara.MulgaraTupleIterator.<init>(MulgaraTupleIterator.java:27)
>> [trippi-mulgara-1.5.4.jar:na]
>>         at
>> org.trippi.impl.mulgara.MulgaraSession.query(MulgaraSession.java:157)
>> [trippi-mulgara-1.5.4.jar:na]
>>         at
>> org.trippi.impl.base.ConcurrentTriplestoreReader.findTuples(Unknown Source)
>> [trippi-core-1.5.4.jar:na]
>>         at
>> org.fcrepo.server.resourceIndex.ResourceIndexImpl.findTuples(ResourceIndexImpl.java:280)
>> [fcrepo-server-3.5.jar:na]
>>         at
>> org.fcrepo.server.resourceIndex.ResourceIndexModule.findTuples(ResourceIndexModule.java:312)
>> [fcrepo-server-3.5.jar:na]
>>         at org.trippi.server.TrippiServer.find(Unknown Source)
>> [trippi-core-1.5.4.jar:na]
>>         at org.trippi.server.http.TrippiServlet.doFind(Unknown Source)
>> [trippi-core-1.5.4.jar:na]
>>         at org.trippi.server.http.TrippiServlet.doGet(Unknown Source)
>> [trippi-core-1.5.4.jar:na]
>>         at
>> org.fcrepo.server.access.RISearchServlet.doGet(RISearchServlet.java:101)
>> [fcrepo-server-3.5.jar:na]
>>         at org.trippi.server.http.TrippiServlet.doGet(Unknown Source)
>> [trippi-core-1.5.4.jar:na]
>>        at org.trippi.server.http.TrippiServlet.doPost(Unknown Source)
>> [trippi-core-1.5.4.jar:na]
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>> [servlet-api.jar:na]
>> [ tomcat stuff ]
>>
>> Caused by: org.mulgara.query.TuplesException: Transaction error
>>         at
>> org.mulgara.resolver.MulgaraInternalTransaction.execute(MulgaraInternalTransaction.java:657)
>> [mulgara-core-2.1.4.jar:na]
>>         at
>> org.mulgara.resolver.TransactionalAnswer.getObject(TransactionalAnswer.java:86)
>> [mulgara-core-2.1.4.jar:na]
>>         at org.trippi.impl.mulgara.RowGroup.initialize(RowGroup.java:45)
>> [trippi-mulgara-1.5.4.jar:na]
>>         at org.trippi.impl.mulgara.RowGroup.<init>(RowGroup.java:33)
>> [trippi-mulgara-1.5.4.jar:na]
>>         at
>> org.trippi.impl.mulgara.CollapsedAnswer.initialize(CollapsedAnswer.java:74)
>> [trippi-mulgara-1.5.4.jar:na]
>>         at
>> org.trippi.impl.mulgara.CollapsedAnswer.<init>(CollapsedAnswer.java:58)
>> [trippi-mulgara-1.5.4.jar:na]
>>         at
>> org.trippi.impl.mulgara.MulgaraTupleIterator.<init>(MulgaraTupleIterator.java:24)
>> [trippi-mulgara-1.5.4.jar:na]
>>         ... 35 common frames omitted
>>
>> Caused by: org.mulgara.query.MulgaraTransactionException: Transaction
>> rollback triggered
>>         at
>> org.mulgara.resolver.MulgaraInternalTransaction.implicitRollback(MulgaraInternalTransaction.java:516)
>> [mulgara-core-2.1.4.jar:na]
>>         at
>> org.mulgara.resolver.MulgaraInternalTransaction.execute(MulgaraInternalTransaction.java:652)
>> [mulgara-core-2.1.4.jar:na]
>>         ... 41 common frames omitted
>>
>> Caused by: *org.mulgara.query.TuplesException: No such variable $k0 in
>> tuples [] *(class org.mulgara.store.tuples.UnconstrainedTuples)
>>         at
>> org.mulgara.store.tuples.AbstractTuples.getColumnIndex(AbstractTuples.java:363)
>> [mulgara-core-2.1.4.jar:na]
>>         at
>> org.mulgara.resolver.GlobalizedAnswer.getColumnIndex(GlobalizedAnswer.java:141)
>> [mulgara-core-2.1.4.jar:na]
>>         at
>> org.mulgara.resolver.SubqueryAnswer.getObject(SubqueryAnswer.java:199)
>> [mulgara-core-2.1.4.jar:na]
>>         at
>> org.mulgara.resolver.TransactionalAnswer$1.execute(TransactionalAnswer.java:88)
>> [mulgara-core-2.1.4.jar:na]
>>         at
>> org.mulgara.resolver.MulgaraInternalTransaction.execute(MulgaraInternalTransaction.java:649)
>> [mulgara-core-2.1.4.jar:na]
>>         ... 41 common frames omitted
>>
>> The exact queries are:
>> *FAILS:* *select count(select $subject $title $type *
>> *from <#ri> *
>> *where $subject <http://quakestudies.canterbury.ac.nz#isPartOf>
>> <info:fedora/qsr-object:296> and $subject <
>> http://purl.org/dc/elements/1.1/type> $type *
>> *and $subject <http://purl.org/dc/elements/1.1/title> $title and
>> $subject <http://purl.org/dc/elements/1.1/type> 'part' *
>> *and (($subject <http://quakestudies.canterbury.ac.nz#needEffectiveRole>
>> $rolepid and ($rolepid <
>> http://quakestudies.canterbury.ac.nz#hasMemberUser> <info:fedora/anon> *
>> *or $rolepid <http://purl.org/dc/elements/1.1/title> 'Public')))) *
>>
>> from <#ri> where $a $b $c
>>
>> *WORKS:* *select $subject $title $type *
>> *from <#ri> *
>> *where $subject <http://quakestudies.canterbury.ac.nz#isPartOf>
>> <info:fedora/qsr-object:296> and $subject <
>> http://purl.org/dc/elements/1.1/type> $type *
>> *and $subject <http://purl.org/dc/elements/1.1/title> $title and
>> $subject <http://purl.org/dc/elements/1.1/type> 'part' *
>> *and (($subject <http://quakestudies.canterbury.ac.nz#needEffectiveRole>
>> $rolepid and ($rolepid <
>> http://quakestudies.canterbury.ac.nz#hasMemberUser> <info:fedora/anon> *
>> *or $rolepid <http://purl.org/dc/elements/1.1/title> 'Public')))*
>>
>> Also, I have a copy of the resourceIndex folder before I restarted the
>> server.
>>
>> Cheers,
>> Richard
>>
>>
>> _______________________________________________
>> Mulgara-general mailing list
>> Mulgara-general at mulgara.org
>> http://lists.mulgara.org/mailman/listinfo/mulgara-general
>>
>>
>
> _______________________________________________
> Mulgara-general mailing list
> Mulgara-general at mulgara.org
> http://lists.mulgara.org/mailman/listinfo/mulgara-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mulgara.org/pipermail/mulgara-general/attachments/20130129/555271a9/attachment.html>


More information about the Mulgara-general mailing list