Giter VIP home page Giter VIP logo

Comments (6)

k00ni avatar k00ni commented on June 2, 2024

Hi @craigdietrich, can you provide us a working exploit of the problem? A minimal graph + the code you use to query the database would be helpful.

from arc2.

craigdietrich avatar craigdietrich commented on June 2, 2024

Thanks for your quick reply, @k00ni! I'll put together an example and get back to you soon.

from arc2.

craigdietrich avatar craigdietrich commented on June 2, 2024

Following up on this, I think I figured out the problem. All of our ARC2 databases were created a number of year ago, even through we've updated the libraries along the way (currently at the most recent release).

It looks like in some of the databases, the id2val table has thousands of rows -- each time a triple is entered it appears that a new entry is added for the predicate even if that predicate already exists

In some of the databases, the number of rows in the id2val table is, say, 100 -- each time a triple is added it re-uses the predicate if it exists.

For the former, I'm not able to query on the predicate because the temp table query is asking for a specific predicate ID, even though there might be hundreds of IDs for a given predicate

For the latter, it works a-okay because there's only one ID per predicate.

I suppose at this stage we can work around this (we only have one client hoping to take advantage of the work we're doing that needs to query on predicates), and I think their DB is the latter. Though, I'm curious if anyone has thoughts on why the former databases had that runaway predicate creation? Curious your thoughts?

from arc2.

k00ni avatar k00ni commented on June 2, 2024

I observed similar behavior when i worked on version 2.4 but can't help you with an explanation.

Maybe the following can help here:

  1. export all triples,
  2. setup the database again using our latest database schema (preferably InnoDb instead of MyISAM) and
  3. import all triples again.

That might not fix possible buggy behavior, but at least the DB schema is stable and ruled out as the source of the problem.

from arc2.

craigdietrich avatar craigdietrich commented on June 2, 2024

@k00ni I was thinking the same thing!

I'm more and more thinking that this issue is related to my other, #135 , because the false positive when asking if the val_hash exists would be impactful on id2val, if id2val was relying on val_hash to see if existing predicates existed.

Is there an easy way ti export all triples and import (ie, a built-in way) that you know of? Otherwise, I suppose I'll write a little tool to do it.

Thanks!

from arc2.

craigdietrich avatar craigdietrich commented on June 2, 2024

Alrighty, this is definitely related to #135 .. I found what I think is another error that was keeping existing predicates from being pulled from id2val.

I'll get both those changes set up in the update fork you created so it can be vetted.

(I still need to figure out a mini tool to export / import the triples, but, I think this should probably be easy enough.)

from arc2.

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.