Details

      Description

      I think the recipe is as follows:
      1) start a fresh copy of bigdata with a new journal and

      # Use Stickler's symmetric DESCRIBE (CBD) algorithm, for good integration with pubby
      com.bigdata.rdf.sail.describeMode=SCBD
      com.bigdata.rdf.sail.describeIterationLimit=10
      com.bigdata.rdf.sail.describeIterationStatementLimit=1000
      

      in amongst the properties file

      2) send this update as the very first operation:

      base <http://localhost:8000/>
      prefix xsd:  <http://www.w3.org/2001/XMLSchema#>
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      prefix owl: <http://www.w3.org/2002/07/owl#>
      prefix skos: <http://www.w3.org/2004/02/skos/core#>
      prefix sd: <http://www.w3.org/ns/sparql-service-description#>
      prefix dc: <http://purl.org/dc/elements/1.1/>
      prefix syapse: </graph/syapse#>
      prefix s: </bdm/api/>
      prefix base: </bdm/api/kbobject/base:>
      prefix based: </bdm/api/appindividualbased:>
      prefix sys: </bdm/api/kbobject/sys:>
      prefix sysd: </bdm/api/appindividualsysd:>
      
      prefix c2: </bdm/api/kbobject/c2:>
      prefix c2d: </bdm/api/appindividualc2d:>
      
      WITH </graph/django/catCo>
      INSERT {
          [] sd:name </graph/django/catCo> ;
               syapse:organization </bdm/api/organization/4>  .
      }
      USING </graph/django/catCo>
      USING NAMED  </graph/django/catCo>
      WHERE
      {
       FILTER NOT EXISTS { ?s sd:name ?o }
      }
      

      The result is a 500 with the end of the stack trace being:

      	... 1 more
      Caused by: org.openrdf.query.UpdateExecutionException: java.lang.IllegalArgumentException
      	at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.executeUpdate(ASTEvalHelper.java:1093)
      	at com.bigdata.rdf.sail.BigdataSailUpdate.execute2(BigdataSailUpdate.java:152)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$UpdateTask.doQuery(BigdataRDFContext.java:1392)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1062)
      	... 6 more
      Caused by: java.lang.IllegalArgumentException
      	at com.bigdata.rdf.sparql.ast.eval.CBD.<init>(CBD.java:144)
      	at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.evaluateGraphQuery(ASTEvalHelper.java:589)
      	at com.bigdata.rdf.sparql.ast.eval.AST2BOpUpdate.convertDeleteInsert(AST2BOpUpdate.java:942)
      	at com.bigdata.rdf.sparql.ast.eval.AST2BOpUpdate.convertUpdateSwitch(AST2BOpUpdate.java:417)
      	at com.bigdata.rdf.sparql.ast.eval.AST2BOpUpdate.convertUpdate(AST2BOpUpdate.java:279)
      	at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.executeUpdate(ASTEvalHelper.java:1087)
      

      Since this is a blocker for me, I am assigning to self

        Activity

        beebs Brad Bebee created issue -
        Hide
        jeremycarroll jeremycarroll added a comment -

        I believe I have fixed this, my change is tiny and is here:
        https://github.com/jeremycarroll/bigdata/commit/6107c6ebebfe4a7306eebffb7a641d14418bf3d1

        I will commit to SVN once my own tests are complete.

        In my opinion the root cause is that the method
        ASTEvalHelper.evaluateGraphQuery
        is too long, and could be split up
        - maybe with a command class pattern (a helper to the helper!) where the three cases:
        a describe query with the describe cache; a describe query; and other; are differentiated before we start and have different subclasses of the command.

        I would be happy to do this refactoring if desired

        Show
        jeremycarroll jeremycarroll added a comment - I believe I have fixed this, my change is tiny and is here: https://github.com/jeremycarroll/bigdata/commit/6107c6ebebfe4a7306eebffb7a641d14418bf3d1 I will commit to SVN once my own tests are complete. In my opinion the root cause is that the method ASTEvalHelper.evaluateGraphQuery is too long, and could be split up - maybe with a command class pattern (a helper to the helper!) where the three cases: a describe query with the describe cache; a describe query; and other; are differentiated before we start and have different subclasses of the command. I would be happy to do this refactoring if desired
        Hide
        bryanthompson bryanthompson added a comment -

        Jeremy,

        I have just rolled back r7319 in which UNION processing was broken. I have tested that rollback both before and after accepting your delta and the delta appears fine in both cases.

        It would be nice to have a unit test which demonstrates the issue that you are "describing"

        Yes, I agree that the describe code became a bit complex. It would also be nice to have it modified to allow cancellation (basically deferring evaluation until the query result object was in the caller's hands).

        It sounds like a worthwhile project to refactor this for maintainability, but (my personal preferences) I would like to close out some other issues first.

        Thanks,
        Bryan

        Show
        bryanthompson bryanthompson added a comment - Jeremy, I have just rolled back r7319 in which UNION processing was broken. I have tested that rollback both before and after accepting your delta and the delta appears fine in both cases. It would be nice to have a unit test which demonstrates the issue that you are "describing" Yes, I agree that the describe code became a bit complex. It would also be nice to have it modified to allow cancellation (basically deferring evaluation until the query result object was in the caller's hands). It sounds like a worthwhile project to refactor this for maintainability, but (my personal preferences) I would like to close out some other issues first. Thanks, Bryan
        Hide
        bryanthompson bryanthompson added a comment -

        Proposed change set looks good.

        CI is clean.

        Ticket is closed.

        Show
        bryanthompson bryanthompson added a comment - Proposed change set looks good. CI is clean. Ticket is closed.
        beebs Brad Bebee made changes -
        Field Original Value New Value
        Workflow Trac Import v2 [ 12656 ] Trac Import v3 [ 14192 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v3 [ 14192 ] Trac Import v4 [ 15521 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v4 [ 15521 ] Trac Import v5 [ 16907 ]
        beebs Brad Bebee made changes -
        Labels Issue_patch_20150625
        beebs Brad Bebee made changes -
        Status Closed - Won't Fix [ 6 ] Open [ 1 ]
        beebs Brad Bebee made changes -
        Status Open [ 1 ] Accepted [ 10101 ]
        beebs Brad Bebee made changes -
        Status Accepted [ 10101 ] In Progress [ 3 ]
        beebs Brad Bebee made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        beebs Brad Bebee made changes -
        Status Resolved [ 5 ] In Review [ 10100 ]
        beebs Brad Bebee made changes -
        Resolution Fixed [ 1 ] Done [ 10000 ]
        Status In Review [ 10100 ] Done [ 10000 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v5 [ 16907 ] Trac Import v6 [ 18110 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v6 [ 18110 ] Trac Import v7 [ 19507 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v7 [ 19507 ] Trac Import v8 [ 21129 ]

          People

          • Assignee:
            jeremycarroll jeremycarroll
            Reporter:
            jeremycarroll jeremycarroll
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: