Fork me on GitHub
#datomic
<
2016-03-23
>
Kira Sotnikov09:03:51

Hi guys, are there a way to ask datomic about address of secondary (passive) instance of HA transactors? I've got a way to get Active instance details:

(datomic.peer/transactor-endpoint db-uri)

Kira Sotnikov09:03:12

I can't find a doc for datomic.peer lib for take a look on all methods

Lambda/Sierra12:03:45

The active transactor writes its location into storage for Peers to find it. I don't think the passive transactor(s) record their location until they become active.

Kira Sotnikov13:03:35

stuartsierra: so I haven't another way except "get active and compare"?

Lambda/Sierra13:03:47

I do not know of any mechanism in Datomic to find passive transactors.

Kira Sotnikov13:03:07

feature request simple_smile

Ben Kamphaus13:03:31

@lowl4tency: the issue here is that the passive transactor doesn’t write to storage, so there’s no way for a peer to get to it.

Ben Kamphaus13:03:21

If this is re: cloud formation ops - i.e., which instance to kill, you should kill at the cloud formation level. I.e., put up a new transactor pair, then when you see HeartMonitorMsec sum go up, kill the old transactor pair.

Ben Kamphaus13:03:25

This will force a failover to the new transactor pair (they’re ready to take over when they’re reporting HeartMonitorMsec metrics. Depending on whether or not there’s a standby at present (again discernible if anything is posting that metric), you can either wait for HeartMonitorMsec to show up again after being absent, or look at samples/count or sum values which will tell you that more than 1 standby transactor is ready to go.

p.brc21:03:08

I am trying to alter my schema. In order to prepare the addition of a unique constraint I added an index with something along the lines of

[{:db/id :person/external-id
  :db/index true
  :db.alter/_attribute :db.part/db}]
But now my transactor is dying with:
WARN  default    datomic.update - {:message "Index creation failed", :db-id “store-0b6b5518-0141-4392-b077-1729ea4464c7", :pid 1965, :tid 12}
java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[na:1.8.0_72]
        at java.io.File.createTempFile(File.java:2024) ~[na:1.8.0_72]
        at datomic.external_sort$temp_file_io$reify__2757.make_temp_file(external_sort.clj:22) ~[datomic-transactor-pro-0.9.5350.jar:na]
        at datomic.external_sort$file_system_sorter$fn__2850.invoke(external_sort.clj:113) ~[datomic-transactor-pro-0.9.5350.jar:na]
I am not sure what I am doing wrong here. I assume permissions for the default temp directory are wrong even though it does not seem like they are and /tmp exists. What is confusing to me is why this has not been an issue before. Does Datomic only create these temp files when I alter an existing schema to add an index?