Code Monkey home page Code Monkey logo

Comments (5)

melvincarvalho avatar melvincarvalho commented on June 3, 2024

I havent yet been able to replicate this.

when I try it in two browsers, the change is propagated to the 2nd browser but the line becomes greyed out. There error I get is not a 409 but:

Uncaught Statement to be removed is not on store: <https://timbl.databox.me/Public/2015/test/results.ttl#id1443027571303> <http://rdfs.org/sioc/ns#content> "g" .
$rdf.IndexedFormula.$rdf.IndexedFormula.removeMatch 
@ mashlib-alpha.js:4191(anonymous function) 
@ mashlib-alpha.js:6259$rdf.sparqlUpdate.sparql._fire.xhr.onreadystatechange 
@ mashlib-alpha.js:6112

from gold.

timbl avatar timbl commented on June 3, 2024

I think you replicated it. "Statement to be removed is not on store:" means "When I went to mirror in my local store the change I asked the server to make, I could not, as the server and localstore have got out of sync. It looks as though one operation replaced "g" with "go" (or something) and another tried at the same time to replace "g" with "ga". One of them should have failed 409, in which case the server store and the localstore would have stayed in sync.

I have found that the linked lists on the gold version get inconsistent (like >1 head) while on the ldnode they don't. The code adds new lines by unhooking the link from the last line to the hub and replacing it with two links one from that last line to a new line and one from the new line to he hub. When this is done without 409 protection, you get the same sort of error that the original link can't be deleted in the local store.

The bug is that the server SHOULD give 409 but does not, when asked to delete something which does not exist in a patch.

from gold.

timbl avatar timbl commented on June 3, 2024

In https://github.com/linkeddata/gold/blob/master/sparqlupdate.go

    case "DELETE", "DELETE DATA":
        for pattern := range query.graph.IterTriples() {
            for _, triple := range g.All(pattern.Subject, pattern.Predicate, nil) {
                if pattern.Object.Equal(triple.Object) {
                    g.Remove(triple)
                }
            }
        }
    }

The DELETE MUST be done before the INSERT and the INSERT MUST BE done ONLY if the delete succeeds.

from gold.

deiu avatar deiu commented on June 3, 2024

Thanks for opening this issue! I'll get on it asap.

from gold.

deiu avatar deiu commented on June 3, 2024

Fixed in 61a9dda

from gold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.