Fork me on GitHub
#datomic
<
2015-08-27
>
Kira Sotnikov07:08:33

How should look the java opts for JVM for connection to ddb transactor?

Kira Sotnikov07:08:44

For PostgresSQL it looks like export DATOMIC_URI="datomic:<sql://dbname?jdbc:postgresql://example.com:5432/datomic?user=datomic&password=datomic>

Kira Sotnikov10:08:56

Guys, I've got infinity redirects when trying to download datomic from Amazon EC2 instance

Kira Sotnikov10:08:19

I've added --max-redirection option but it doesn't help

Kira Sotnikov10:08:45

Interesting, from laptop it works as expected

Kira Sotnikov10:08:50

It hurts me 😞

jeffh-fp13:08:35

redirects all the way down

sdegutis15:08:59

What's a fast way to rollback a test database (like "datomic:") to a blank slate, other than ((juxt d/delete-database d/create-database) uri)?

kbaribeau16:08:57

@sdegutis: I've been just opening a connection to a new url to get a blank slate

kbaribeau16:08:41

(def url "datomic:")
(def num-resets (atom 0))

(defn conn-to-fresh-db []
  (let [url (str url (swap! num-resets inc))]
    (schema/ensure-schema url)
    (d/connect url)))
^ seems like a total hack, but also seems to get the job done

sdegutis16:08:34

@kbaribeau: I imagine that would make your memory usage skyrocket if you used an auto-test-rerunner?

kbaribeau16:08:57

it might, I was having problems with data pollution when deleting dbs though, I figured there must be a cache somewhere that's operating by URL that delete-database wouldn't clear

sdegutis17:08:34

@kbaribeau: I've been using delete-database with no problem for 2 years, using the same in-memory uri.

sdegutis17:08:50

@kbaribeau: So you've got something else going on there that you might want to fix.

kbaribeau17:08:17

yeah, this code has been sitting for about a year and a half without causing problems, so I'm content to let it sit

sdegutis17:08:05

@kbaribeau: afaict that means you've got an error somewhere in your code that's hiding, from my experience it'll probably come out and bite you at some point in the future, but any way your choice just psa/fyi that's all

kbaribeau17:08:26

alright, thanks for the input I guess?

sdegutis21:08:20

When should you not use the reader-macro form of #db/id?