You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by GitBox <gi...@apache.org> on 2022/07/15 06:12:48 UTC

[GitHub] [jena] LorenzBuehmann opened a new issue, #1442: Wrapping text dataset in geo dataset fails, other way around not

LorenzBuehmann opened a new issue, #1442:
URL: https://github.com/apache/jena/issues/1442

   ### Version
   
   4.6.0 latest SNAPSHOT
   
   ### What happened?
   
   When using both, the text and the geo index the order of wrapping both matters.
   
   **Works**: TDB2 -> Geo -> Text -> Service
   **Fails**:  TDB2 -> Text  -> Geo-> Service
   
   
   The reason is basically that the geo calls
   ```
   boolean isEmpty = dataset.calculate(()->dataset.isEmpty());
   ```
   which as far as I understand is a "promoting" transaction. The problem is, that the text index implementation never implemented handling those, see the lines in [DatasetGraphText](https://github.com/apache/jena/blob/main/jena-text/src/main/java/org/apache/jena/query/text/DatasetGraphText.java#L159-L161)
   
   The question is now:
   - Do we have to implement handling that transaction type?
   - Or should we call `dataset.calc()` instead which is no promoting type? What would be the implications here?
   
   Attached are 2 assembler files, need GeoSPARQL module enabled in Fuseki (we should make this default anyways I think and add it to the POM similar to text being enabled by default)
   
   [fails_tdb2_text_geo_assembler.ttl.gz](https://github.com/apache/jena/files/9118293/fails_tdb2_text_geo_assembler.ttl.gz)
   [works_tdb2_geo_text_assembler.ttl.gz](https://github.com/apache/jena/files/9118295/works_tdb2_geo_text_assembler.ttl.gz)
    
   
   ### Relevant output and stacktrace
   
   ```shell
   Caused by: java.lang.UnsupportedOperationException: begin(READ_PROMOTE)
   	at org.apache.jena.query.text.DatasetGraphText.begin(DatasetGraphText.java:161) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.sparql.core.DatasetImpl.begin(DatasetImpl.java:114) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.system.Txn.calc(Txn.java:96) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.system.Txn.calculate(Txn.java:67) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.sparql.core.Transactional.calculate(Transactional.java:248) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.geosparql.assembler.GeoAssembler.prepareSpatialExtension(GeoAssembler.java:176) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.geosparql.assembler.GeoAssembler.createDataset(GeoAssembler.java:158) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:40) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:33) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   	at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157) ~[fuseki-server.jar:4.6.0-SNAPSHOT]
   ```
   
   
   ### Are you interested in making a pull request?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs commented on issue #1442: Wrapping text dataset in geo dataset fails, other way around not

Posted by GitBox <gi...@apache.org>.
afs commented on issue #1442:
URL: https://github.com/apache/jena/issues/1442#issuecomment-1185405948

   I don't see a question :smile:
   
   Maybe jena-text can support promoting transactions at least the "dirty read" variant READ_COMMITTED_PROMOTE. It will be conditional on the underlying store choice. (see PR #1444).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] LorenzBuehmann commented on issue #1442: Wrapping text dataset in geo dataset fails, other way around not

Posted by GitBox <gi...@apache.org>.
LorenzBuehmann commented on issue #1442:
URL: https://github.com/apache/jena/issues/1442#issuecomment-1185360334

   That's what I thought - thanks for clarification.
   
   Follow up question, this would only solve the combined setup for me - but we should keep in mind that other datasets doing those promoting transactions can't wrap the text index, should always be the other way around.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs closed issue #1442: Wrapping text dataset in geo dataset fails, other way around not

Posted by GitBox <gi...@apache.org>.
afs closed issue #1442: Wrapping text dataset in geo dataset fails, other way around not
URL: https://github.com/apache/jena/issues/1442


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org


[GitHub] [jena] afs commented on issue #1442: Wrapping text dataset in geo dataset fails, other way around not

Posted by GitBox <gi...@apache.org>.
afs commented on issue #1442:
URL: https://github.com/apache/jena/issues/1442#issuecomment-1185272706

   `isEmpty` only requires read access so 
   
   ```
      dataset.calculateRead
   ```
   which is
   ```
       calc(dataset, TxnType.READ, ...)
   ```
   
   should be enough and should work if there is an extant transaction.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org