This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-16
Channels
- # admin-announcements (27)
- # beginners (17)
- # boot (216)
- # cider (13)
- # cljs-dev (4)
- # clojure (103)
- # clojure-berlin (2)
- # clojure-dev (18)
- # clojure-italy (14)
- # clojure-japan (1)
- # clojure-nl (4)
- # clojure-norway (1)
- # clojure-russia (8)
- # clojurescript (291)
- # clojurex (12)
- # datomic (31)
- # editors (1)
- # events (16)
- # hoplon (60)
- # jobs (1)
- # ldnclj (85)
- # luminus (15)
- # onyx (2)
- # re-frame (18)
- # reagent (36)
- # remote-jobs (3)
- # yada (3)
I have a prototype app that I'd like to run on a single EC2 t2.small instance (2 GB RAM) along wih a datomic transactor. That seems reasonable, but the transactor keeps dying with OOM errrors. Are there some knobs I can turn or is it just "transactors need at least 4GB's of RAM" ?
@shofetim: there are JVM memory settings you could probably tweak
Is there a way to do a sort of set operation on a entity?
so that you can say on this entity only set these properties en delete everything else of this entity?
@mitchelkuijpers: not that I know of inbuilt. Should be easy enough with a database function though.
@tcrayford: That was what I was thinking, updates and additions are very easy though
Hello!
I found what appears to be inconsistent behavior in the in-memory and the production datomic databases
it has taken me a while to isolate the bug to that
@ericnormand: what was the inconsistency?
In a database function, I was calling coll?
on a value from an entity.
For a many cardinality property, the in-memory version was returning a Clojure set
so (:x/y entity) => #{}
but in the production version, it returns a java.util.HashSet
so coll?
was returning true in one and false in the other
I don't know, but I'd wager maybe the memory store doesn't even serialize segments (with fressian), just stores raw data in memory
I don't think Datomic makes any commitment on the concrete data type returned there
the java api javadoc http://docs.datomic.com/javadoc/datomic/Entity.html#get(java.lang.Object) says it will be a "collection" which to me means java.util.Collection
not even that it must be a java.util.Set
but standard caveat that I'm not on the datomic team and if you don't hear an answer here from someone on the team, feel free to ask on the mailing list
@ericnormand: I can confirm that as @alexmiller mentions, Clojure collection type continuity is not guaranteed when using the API. In this specific case, it’s when passing the collection as a parameter to a database function that you see the behavior you describe (expected for current release, but the impl specific type info you see here is also not guaranteed).
thanks, @alexmiller and @bkamphaus
I'm using (instance? java.util.Collection x)
now
and it's actually a little simpler that way
just took a while to debug
it's not easy getting information out of a database function
I had to package it up in an exception
@bkamphaus: sounds like that could be a good thing to put in a Datomic caveats/FAQ section if it’s not already documented.
@danielcompton: documentation request acknowledged -- I’ll discuss with the team.