Fork me on GitHub
#datomic
<
2015-06-27
>
bhagany05:06:36

I should probably just put this down for now, but I'm stubborn. I've got a complex pull pattern that isn't working, and I cannot for the life of me figure out why. I've got it narrowed down to a pretty minimal test case. This works:

bhagany05:06:42

(d/q '[:find (pull ?e [{:row/_columns [:db/id]}]) . :in $ ?e] db 277076930201266)

bhagany05:06:55

This doesn't:

bhagany05:06:57

(d/q '[:find (pull ?e [* {:row/_columns [:db/id]}]) . :in $ ?e] db 277076930201266)

bhagany05:06:25

Entire output:

user=> (:row/_columns (d/q '[:find (pull ?e [{:row/_columns [:db/id]}]) . :in $ ?e] db 277076930201266))
[{:db/id 277076930201265}]
user=> (:row/_columns (d/q '[:find (pull ?e [* {:row/_columns [:db/id]}]) . :in $ ?e] db 277076930201266))
nil

bhagany05:06:27

The only difference between the two is the wildcard at the top level of the pull spec. If anybody can see something I'm missing, I surely would appreciate it if you'd point it out to me.

bhagany05:06:04

The crazy thing about this is that works fine with other attributes

Ben Kamphaus06:06:20

@bhagany: do you have this isolated in a test db that you could potentially share? Or that you have schema/tx instructions for?

Ben Kamphaus06:06:46

@bhagany: we had a similar bug reported but were unable to reproduce it with our own sample data (e.g. mbrainz) and the reporter didn’t follow up with their own data/instructions for repro.

Ben Kamphaus06:06:42

complicating issues, the bug I’ve seen that looked similar was reported only for a test suite running against a mem db. The user didn’t report whether or not they were able to repro on durable storage.

bhagany13:06:18

@bkamphaus: yes, I can share it, and I'm using dev storage. Do you just need datomic.h2.db?

bhagany13:06:06

@bkamphaus: I hope I've got that right - I'm going to be leaving shortly for a vacation and won't be back until Tuesday. So, here's the db: https://www.dropbox.com/s/kb3f30irv1eu2z0/datomic.h2.db?dl=0

Ben Kamphaus13:06:29

@bhagany: easiest way to pass is just the backup/restore mechanism. e.g., $DATOMIC_DIR/bin/datomic backup-db datomic:<dev://localhost:4334/dbname> file:///path/to/dbname

bhagany14:06:22

The weekend support here is really very appreciated. Thank you.

Ben Kamphaus14:06:37

No worries, @bhagany - enjoy your vacation time!

bhagany14:06:25

thanks 😄