Coder Social home page Coder Social logo

Comments (8)

kordano avatar kordano commented on July 25, 2024

Thanks, I'll have a look at it.

from datahike.

whilo avatar whilo commented on July 25, 2024

You are peeking into the internals, which is ok, but you have to use :eavt-durable, we still have to change that to :eavt with the next cleanup (probably rebase on upstream datascript). This should also address the pull issue. The actual bug you are describing is visible in

(d/q '[:find ?e ?v
       :where [?e :my/vec ?v]]
  @conn)

My suspicion is that something is wrong with schema handling the memory backend.

from datahike.

grischoun avatar grischoun commented on July 25, 2024

I started having look at the problem.
When I try the failing transaction:
@(d/transact conn [[:db/add [:my/id "x"] :my/vec ["x" "y" "z"]] [:db/add [:my/id "x"] :my/map {:x "x" :y "y" :z "z"}]])

I get the following NullPointerException:
screenshot 2018-11-16 at 11 40 41

@pm4r, do you see the same thing?

from datahike.

pm4r avatar pm4r commented on July 25, 2024

@grischoun Actually I do have same stack trace at this transaction. I didn't realize it earlier because It turns out if I evaluated expressions one by one in my editor (Atom + ProtoRepl) it didn't evaluate derefing future so I didn't see exception, but executing larger block at once indeed throws it. That explains why db had nothing related to that transaction.

@whilo I didn't know about :eavt-durable, will remember that in future. I used :eavt almost exclusively to check what's inside when I see something unexpected,

from datahike.

whilo avatar whilo commented on July 25, 2024

We will get rid of the :eavt-durable and :eavt distinction. Right now we are framing datahike as a joint database for ClojureScript and Clojure and will probably rebase it on a current version of datascript to make it cleaner. This should be transparent to users through the import/export upgrade procedure.

from datahike.

whilo avatar whilo commented on July 25, 2024

Uh that went quick at closing the issue, I will reopen it for now until we have the fixed hitchhiker tree tested with datahike.

from datahike.

whilo avatar whilo commented on July 25, 2024

This fixes the issue, I have tested it.

from datahike.

whilo avatar whilo commented on July 25, 2024

There are still the schema problems open though. I think datahike should throw if you try to assign the same attribute multiple times, which it doesn't here.

from datahike.

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.